<!doctype html><html lang="en">
 <head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  <title>CSS Images Module Level 4</title>
  <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
  <meta content="exploring" name="csswg-work-status">
  <meta content="ED" name="w3c-status">
  <meta content="This module contains the features of CSS level 4 relating to the <image> type and replaced elements.  	It includes and extends the functionality of CSS level 2 [[CSS21]] and in the previous level of this specification [[css3-images]].  	The main extensions compared to &quot;CSS Images Module Level 3&quot; [[css3-images]] are several additions to the <image> type, such as the &apos;&apos;image()&apos;&apos; notation, the &apos;&apos;element()&apos;&apos; notation, and conic gradients.  " name="abstract">
  <link href="../default.css" rel="stylesheet" type="text/css">
  <link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
<style>
  body {
    background: url("https://www.w3.org/StyleSheets/TR/logo-ED") top left no-repeat;
  }
  </style>
  <link href="https://www.w3.org/TR/css4-images/" rel="canonical">
<style>/* style-md-lists */

/* This is a weird hack for me not yet following the commonmark spec
   regarding paragraph and lists. */
[data-md] > :first-child {
    margin-top: 0;
}
[data-md] > :last-child {
    margin-bottom: 0;
}</style>
<style>/* style-caniuse-panel */

            .caniuse-status { font: 1em sans-serif; width: 9em; padding: 0.3em; position: absolute; z-index: 8; top: auto; right: 0.3em; background: #EEE; color: black; box-shadow: 0 0 3px #999; overflow: hidden; border-collapse: initial; border-spacing: initial; }
            .caniuse-status.wrapped { width: 1em; height: 1em; }
            .caniuse-status.wrapped > :not(input) { display: none; }
            .caniuse-status > input { position: absolute; right: 0; top: 0; width: 1em; height: 1em; border: none; background: transparent; padding: 0; margin: 0; }
            .caniuse-status > p { font-size: 0.6em; margin: 0; padding: 0; }
            .caniuse-status > p + p { padding-top: 0.5em; }
            .caniuse-status > .support { display: block; }
            .caniuse-status > .support > span { padding: 0.2em 0; display: block; display: table; }
            .caniuse-status > .support > span.partial { color: #666666; filter: grayscale(50%); }
            .caniuse-status > .support > span.no { color: #CCCCCC; filter: grayscale(100%); }
            .canisue-status > .support > span.no::before { opacity: 0.5; }
            .caniuse-status > .support > span:first-of-type { padding-top: 0.5em; }
            .caniuse-status > .support > span > span { padding: 0 0.5em; display: table-cell; vertical-align: top; }
            .caniuse-status > .support > span > span:first-child { width: 100%; }
            .caniuse-status > .support > span > span:last-child { width: 100%; white-space: pre; padding: 0; }
            .caniuse-status > .support > span::before { content: ' '; display: table-cell; min-width: 1.5em; height: 1.5em; background: no-repeat center center; background-size: contain; text-align: right; font-size: 0.75em; font-weight: bold; }
            .caniuse-status > .support > .and_chr::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome.svg); }
            .caniuse-status > .support > .and_ff::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); }
            .caniuse-status > .support > .and_uc::before { background-image: url(https://resources.whatwg.org/browser-logos/uc.png); } /* UC Browser for Android */
            .caniuse-status > .support > .android::before { background-image: url(https://resources.whatwg.org/browser-logos/android.svg); }
            .caniuse-status > .support > .bb::before { background-image: url(https://resources.whatwg.org/browser-logos/bb.jpg); } /* Blackberry Browser */
            .caniuse-status > .support > .chrome::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome.svg); }
            .caniuse-status > .support > .edge::before { background-image: url(https://resources.whatwg.org/browser-logos/edge.svg); }
            .caniuse-status > .support > .firefox::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); }
            .caniuse-status > .support > .ie::before { background-image: url(https://resources.whatwg.org/browser-logos/ie.png); }
            .caniuse-status > .support > .ie_mob::before { background-image: url(https://resources.whatwg.org/browser-logos/ie-mobile.svg); }
            .caniuse-status > .support > .ios_saf::before { background-image: url(https://resources.whatwg.org/browser-logos/safari-ios.svg); }
            .caniuse-status > .support > .op_mini::before { background-image: url(https://resources.whatwg.org/browser-logos/opera-mini.png); }
            .caniuse-status > .support > .op_mob::before { background-image: url(https://resources.whatwg.org/browser-logos/opera.svg); }
            .caniuse-status > .support > .opera::before { background-image: url(https://resources.whatwg.org/browser-logos/opera.svg); }
            .caniuse-status > .support > .safari::before { background-image: url(https://resources.whatwg.org/browser-logos/safari.png); }
            .caniuse-status > .support > .samsung::before { background-image: url(https://resources.whatwg.org/browser-logos/samsung.svg); }
            .caniuse-status > .caniuse { text-align: right; font-style: italic; }
            @media (max-width: 767px) {
                .caniuse-status.wrapped { width: 9em; height: auto; }
                .caniuse-status:not(.wrapped) { width: 1em; height: 1em; }
                .caniuse-status.wrapped > :not(input) { display: block; }
                .caniuse-status:not(.wrapped) > :not(input) { display: none; }
            }</style>
<style>/* style-selflinks */

.heading, .issue, .note, .example, li, dt {
    position: relative;
}
a.self-link {
    position: absolute;
    top: 0;
    left: calc(-1 * (3.5rem - 26px));
    width: calc(3.5rem - 26px);
    height: 2em;
    text-align: center;
    border: none;
    transition: opacity .2s;
    opacity: .5;
}
a.self-link:hover {
    opacity: 1;
}
.heading > a.self-link {
    font-size: 83%;
}
li > a.self-link {
    left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
    top: auto;
    left: auto;
    opacity: 0;
    width: 1.5em;
    height: 1.5em;
    background: gray;
    color: white;
    font-style: normal;
    transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
    opacity: 1;
}
dfn > a.self-link:hover {
    color: black;
}

a.self-link::before            { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before      { content: "#"; }</style>
<style>/* style-counters */

body {
    counter-reset: example figure issue;
}
.issue {
    counter-increment: issue;
}
.issue:not(.no-marker)::before {
    content: "Issue " counter(issue);
}

.example {
    counter-increment: example;
}
.example:not(.no-marker)::before {
    content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
    content: "Invalid Example" counter(example);
}

figcaption {
    counter-increment: figure;
}
figcaption:not(.no-marker)::before {
    content: "Figure " counter(figure) " ";
}</style>
<style>/* style-var-click-highlighting */

    var { cursor: pointer; }
    var.selected0 { background-color: #F4D200; box-shadow: 0 0 0 2px #F4D200; }
    var.selected1 { background-color: #FF87A2; box-shadow: 0 0 0 2px #FF87A2; }
    var.selected2 { background-color: #96E885; box-shadow: 0 0 0 2px #96E885; }
    var.selected3 { background-color: #3EEED2; box-shadow: 0 0 0 2px #3EEED2; }
    var.selected4 { background-color: #EACFB6; box-shadow: 0 0 0 2px #EACFB6; }
    var.selected5 { background-color: #82DDFF; box-shadow: 0 0 0 2px #82DDFF; }
    var.selected6 { background-color: #FFBCF2; box-shadow: 0 0 0 2px #FFBCF2; }
    </style>
<style>/* style-autolinks */

.css.css, .property.property, .descriptor.descriptor {
    color: #005a9c;
    font-size: inherit;
    font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
    content: "‘";
}
.css::after, .property::after, .descriptor::after {
    content: "’";
}
.property, .descriptor {
    /* Don't wrap property and descriptor names */
    white-space: nowrap;
}
.type { /* CSS value <type> */
    font-style: italic;
}
pre .property::before, pre .property::after {
    content: "";
}
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {
    content: "‘";
}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {
    content: "’";
}

[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
    content: "";
}

[data-link-type=element],
[data-link-type=element-attr] {
    font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
    font-size: .9em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after  { content: ">" }

[data-link-type=biblio] {
    white-space: pre;
}</style>
<style>/* style-dfn-panel */

.dfn-panel {
    position: absolute;
    z-index: 35;
    height: auto;
    width: -webkit-fit-content;
    width: fit-content;
    max-width: 300px;
    max-height: 500px;
    overflow: auto;
    padding: 0.5em 0.75em;
    font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
    background: #DDDDDD;
    color: black;
    border: outset 0.2em;
}
.dfn-panel:not(.on) { display: none; }
.dfn-panel * { margin: 0; padding: 0; text-indent: 0; }
.dfn-panel > b { display: block; }
.dfn-panel a { color: black; }
.dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; }
.dfn-panel > b + b { margin-top: 0.25em; }
.dfn-panel ul { padding: 0; }
.dfn-panel li { list-style: inside; }
.dfn-panel.activated {
    display: inline-block;
    position: fixed;
    left: .5em;
    bottom: 2em;
    margin: 0 auto;
    max-width: calc(100vw - 1.5em - .4em - .5em);
    max-height: 30vh;
}

.dfn-paneled { cursor: pointer; }
</style>
<style>/* style-railroad */
svg.railroad-diagram{background-color:hsl(30,20%,95%);}svg.railroad-diagram path{stroke-width:3px;stroke:black;fill:rgba(0,0,0,0);}svg.railroad-diagram text{font:bold 14px monospace;text-anchor:middle;}svg.railroad-diagram text.label{text-anchor:start;}svg.railroad-diagram text.comment{font:italic 12px monospace;}svg.railroad-diagram rect{stroke-width:3px;stroke:black;fill:hsl(120,100%,90%);}</style>
<style>/* style-syntax-highlighting */
pre.idl.highlight { color: #708090; }
.highlight:not(.idl) { background: hsl(24, 20%, 95%); }
code.highlight { padding: .1em; border-radius: .3em; }
pre.highlight, pre > code.highlight { display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; }
c-[a] { color: #990055 } /* Keyword.Declaration */
c-[b] { color: #990055 } /* Keyword.Type */
c-[c] { color: #708090 } /* Comment */
c-[d] { color: #708090 } /* Comment.Multiline */
c-[e] { color: #0077aa } /* Name.Attribute */
c-[f] { color: #669900 } /* Name.Tag */
c-[g] { color: #222222 } /* Name.Variable */
c-[k] { color: #990055 } /* Keyword */
c-[l] { color: #000000 } /* Literal */
c-[m] { color: #000000 } /* Literal.Number */
c-[n] { color: #0077aa } /* Name */
c-[o] { color: #999999 } /* Operator */
c-[p] { color: #999999 } /* Punctuation */
c-[s] { color: #a67f59 } /* Literal.String */
c-[t] { color: #a67f59 } /* Literal.String.Single */
c-[u] { color: #a67f59 } /* Literal.String.Double */
c-[cp] { color: #708090 } /* Comment.Preproc */
c-[c1] { color: #708090 } /* Comment.Single */
c-[cs] { color: #708090 } /* Comment.Special */
c-[kc] { color: #990055 } /* Keyword.Constant */
c-[kn] { color: #990055 } /* Keyword.Namespace */
c-[kp] { color: #990055 } /* Keyword.Pseudo */
c-[kr] { color: #990055 } /* Keyword.Reserved */
c-[ld] { color: #000000 } /* Literal.Date */
c-[nc] { color: #0077aa } /* Name.Class */
c-[no] { color: #0077aa } /* Name.Constant */
c-[nd] { color: #0077aa } /* Name.Decorator */
c-[ni] { color: #0077aa } /* Name.Entity */
c-[ne] { color: #0077aa } /* Name.Exception */
c-[nf] { color: #0077aa } /* Name.Function */
c-[nl] { color: #0077aa } /* Name.Label */
c-[nn] { color: #0077aa } /* Name.Namespace */
c-[py] { color: #0077aa } /* Name.Property */
c-[ow] { color: #999999 } /* Operator.Word */
c-[mb] { color: #000000 } /* Literal.Number.Bin */
c-[mf] { color: #000000 } /* Literal.Number.Float */
c-[mh] { color: #000000 } /* Literal.Number.Hex */
c-[mi] { color: #000000 } /* Literal.Number.Integer */
c-[mo] { color: #000000 } /* Literal.Number.Oct */
c-[sb] { color: #a67f59 } /* Literal.String.Backtick */
c-[sc] { color: #a67f59 } /* Literal.String.Char */
c-[sd] { color: #a67f59 } /* Literal.String.Doc */
c-[se] { color: #a67f59 } /* Literal.String.Escape */
c-[sh] { color: #a67f59 } /* Literal.String.Heredoc */
c-[si] { color: #a67f59 } /* Literal.String.Interpol */
c-[sx] { color: #a67f59 } /* Literal.String.Other */
c-[sr] { color: #a67f59 } /* Literal.String.Regex */
c-[ss] { color: #a67f59 } /* Literal.String.Symbol */
c-[vc] { color: #0077aa } /* Name.Variable.Class */
c-[vg] { color: #0077aa } /* Name.Variable.Global */
c-[vi] { color: #0077aa } /* Name.Variable.Instance */
c-[il] { color: #000000 } /* Literal.Number.Integer.Long */
</style>
 <body class="h-entry">
  <div class="head">
   <p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"> </a> </p>
   <h1 class="p-name no-ref" id="title">CSS Images Module Level 4</h1>
   <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="1970-01-01">1 January 1970</time></span></h2>
   <details>
    <summary>Specification Metadata</summary>
    <div data-fill-with="spec-metadata">
     <dl>
      <dt>This version:
      <dd><a class="u-url" href="https://drafts.csswg.org/css-images-4/">https://drafts.csswg.org/css-images-4/</a>
      <dt>Latest published version:
      <dd><a href="https://www.w3.org/TR/css4-images/">https://www.w3.org/TR/css4-images/</a>
      <dt>Previous Versions:
      <dd><a href="https://www.w3.org/TR/2012/WD-css4-images-20120911/" rel="prev">https://www.w3.org/TR/2012/WD-css4-images-20120911/</a>
      <dt>Issue Tracking:
      <dd><a href="http://www.w3.org/Style/CSS/Tracker/products/27">Tracker</a>
      <dd><a href="https://github.com/w3c/csswg-drafts/labels/css-images-4">GitHub Issues</a>
      <dt class="editor">Editors:
      <dd class="editor p-author h-card vcard" data-editor-id="42199"><a class="p-name fn u-url url" href="http://xanthir.com/contact/">Tab Atkins Jr.</a> (<span class="p-org org">Google</span>)
      <dd class="editor p-author h-card vcard" data-editor-id="35400"><a class="p-name fn u-url url" href="http://fantasai.inkedblade.net/contact">Elika J. Etemad / fantasai</a> (<span class="p-org org">Invited Expert</span>)
      <dd class="editor p-author h-card vcard" data-editor-id="52258"><a class="p-name fn u-url url" href="http://lea.verou.me/about">Lea Verou</a> (<span class="p-org org">Invited Expert</span>)
      <dt>Suggest an Edit for this Spec:
      <dd><a href="https://github.com/w3c/csswg-drafts/blob/master/css-images-4/Overview.bs">GitHub Editor</a>
     </dl>
    </div>
   </details>
   <div data-fill-with="warning"></div>
   <p class="copyright" data-fill-with="copyright"><a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 1970 <a href="https://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="https://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="https://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="https://www.keio.ac.jp/">Keio</a>, <a href="https://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document">permissive document license</a> rules apply. </p>
   <hr title="Separator for header">
  </div>
  <div class="p-summary" data-fill-with="abstract">
   <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
   <p>This module contains the features of CSS level 4 relating to the <a class="production css" data-link-type="type" href="#typedef-image" id="ref-for-typedef-image">&lt;image></a> type and replaced elements.

	It includes and extends the functionality of CSS level 2 <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a> and in the previous level of this specification <a data-link-type="biblio" href="#biblio-css3-images">[css3-images]</a>.
	The main extensions compared to "CSS Images Module Level 3" <span>[css3-images]</span> are several additions to the <span class="production" id="ref-for-typedef-image①">&lt;image></span> type, such as the <a class="css" data-link-type="maybe" href="#funcdef-image" id="ref-for-funcdef-image">image()</a> notation, the <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element">element()</a> notation, and conic gradients.</p>
    <a href="https://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, etc. 
  </div>
  <h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
  <div data-fill-with="status">
   <p> This is a public copy of the editors’ draft.
	It is provided for discussion only and may change at any moment.
	Its publication here does not imply endorsement of its contents by W3C.
	Don’t cite this document other than as work in progress. </p>
   <p> <a href="https://github.com/w3c/csswg-drafts/issues">GitHub Issues</a> are preferred for discussion of this specification.
	When filing an issue, please put the text “css-images” in the title,
	preferably like this:
	“[css-images] <i data-lt>…summary of comment…</i>”.
	All issues and comments are <a href="https://lists.w3.org/Archives/Public/public-css-archive/">archived</a>,
	and there is also a <a href="https://lists.w3.org/Archives/Public/www-style/">historical archive</a>. </p>
   <p> This document was produced by the <a href="https://www.w3.org/Style/CSS/">CSS Working Group</a>. </p>
   <p> This document was produced by a group operating under
	the <a href="https://www.w3.org/Consortium/Patent-Policy/">W3C Patent Policy</a>.
	W3C maintains a <a href="https://www.w3.org/2004/01/pp-impl/32061/status" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group;
	that page also includes instructions for disclosing a patent.
	An individual who has actual knowledge of a patent which the individual believes contains <a href="https://www.w3.org/Consortium/Patent-Policy/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="https://www.w3.org/Consortium/Patent-Policy/#sec-Disclosure">section 6 of the W3C Patent Policy</a>. </p>
   <p> This document is governed by the <a href="https://www.w3.org/2019/Process-20190301/" id="w3c_process_revision">1 March 2019 W3C Process Document</a>. </p>
   <p></p>
  </div>
  <div data-fill-with="at-risk"></div>
  <nav data-fill-with="table-of-contents" id="toc">
   <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
   <ol class="toc" role="directory">
    <li><a href="#intro"><span class="secno">1</span> <span class="content">Introduction</span></a>
    <li>
     <a href="#image-values"><span class="secno">2</span> <span class="content">2D Image Values: the <span class="production">&lt;image></span> type</span></a>
     <ol class="toc">
      <li><a href="#image-file-formats"><span class="secno">2.1</span> <span class="content">Image File Formats</span></a>
      <li><a href="#url-notation"><span class="secno">2.2</span> <span class="content">Image References: the <span class="css">url()</span> notation</span></a>
      <li><a href="#image-set-notation"><span class="secno">2.3</span> <span class="content">Resolution Negotiation: the <span class="css">image-set()</span> notation</span></a>
      <li>
       <a href="#image-notation"><span class="secno">2.4</span> <span class="content">Image Fallbacks and Annotations: the <span class="css">image()</span> notation</span></a>
       <ol class="toc">
        <li><a href="#image-fallbacks"><span class="secno">2.4.1</span> <span class="content">Image Fallbacks</span></a>
        <li><a href="#image-fragments"><span class="secno">2.4.2</span> <span class="content">Image Fragments</span></a>
        <li><a href="#color-images"><span class="secno">2.4.3</span> <span class="content">Solid-color Images</span></a>
        <li><a href="#bidi-images"><span class="secno">2.4.4</span> <span class="content">Bidi-sensitive Images</span></a>
       </ol>
      <li>
       <a href="#cross-fade-function"><span class="secno">2.5</span> <span class="content">Combining images: the <span class="css">cross-fade()</span> notation</span></a>
       <ol class="toc">
        <li><a href="#cross-fade-sizing"><span class="secno">2.5.1</span> <span class="content"><span class="css">cross-fade()</span> Sizing</span></a>
        <li><a href="#cross-fade-painting"><span class="secno">2.5.2</span> <span class="content"><span class="css">cross-fade()</span> Painting</span></a>
        <li><a href="#cross-fade-complex"><span class="secno">2.5.3</span> <span class="content">Simplifying Complex <span class="css">cross-fade()</span></span></a>
       </ol>
      <li>
       <a href="#element-notation"><span class="secno">2.6</span> <span class="content">Using Elements as Images: the <span class="css">element()</span> notation</span></a>
       <ol class="toc">
        <li><a href="#paint-sources"><span class="secno">2.6.1</span> <span class="content"> Paint Sources</span></a>
        <li><a href="#elementsources"><span class="secno">2.6.2</span> <span class="content"> Using Out-Of-Document Sources: the <code>ElementSources</code> interface</span></a>
        <li><a href="#element-cycles"><span class="secno">2.6.3</span> <span class="content"> Cycle Detection</span></a>
       </ol>
     </ol>
    <li>
     <a href="#gradients"><span class="secno">3</span> <span class="content"> Gradients</span></a>
     <ol class="toc">
      <li><a href="#linear-gradients"><span class="secno">3.1</span> <span class="content">Linear Gradients: the <span class="css">linear-gradient()</span> notation</span></a>
      <li><a href="#radial-gradients"><span class="secno">3.2</span> <span class="content">Radial Gradients: the <span class="css">radial-gradient()</span> notation</span></a>
      <li><a href="#conic-gradients"><span class="secno">3.3</span> <span class="content"> Conic Gradients: the <span class="css">conic-gradient()</span> notation</span></a>
      <li><a href="#repeating-gradients"><span class="secno">3.4</span> <span class="content"> Repeating Gradients: the <span class="css">repeating-linear-gradient()</span>, <span class="css">repeating-radial-gradient()</span>, and <span class="css">repeating-conic-gradient()</span> notations</span></a>
      <li>
       <a href="#gradient-colors"><span class="secno">3.5</span> <span class="content">Defining Gradient Color</span></a>
       <ol class="toc">
        <li><a href="#color-stop-syntax"><span class="secno">3.5.1</span> <span class="content"> Color Stop Lists</span></a>
        <li><a href="#coloring-gradient-line"><span class="secno">3.5.2</span> <span class="content"> Coloring the Gradient Line</span></a>
        <li><a href="#color-stop-fixup"><span class="secno">3.5.3</span> <span class="content"> Color Stop “Fixup”</span></a>
       </ol>
     </ol>
    <li><a href="#stripes"><span class="secno">4</span> <span class="content">1D Image Values: the <span class="css">stripes()</span> notation</span></a>
    <li>
     <a href="#sizing"><span class="secno">5</span> <span class="content">Sizing Images and Objects in CSS</span></a>
     <ol class="toc">
      <li><a href="#the-object-fit"><span class="secno">5.1</span> <span class="content">Sizing Objects: the <span class="property">object-fit</span> property</span></a>
     </ol>
    <li>
     <a href="#image-processing"><span class="secno">6</span> <span class="content">Image Processing</span></a>
     <ol class="toc">
      <li><a href="#the-image-resolution"><span class="secno">6.1</span> <span class="content">Overriding Image Resolutions: the <span class="property">image-resolution</span> property</span></a>
     </ol>
    <li>
     <a href="#interpolation"><span class="secno">7</span> <span class="content">Interpolation</span></a>
     <ol class="toc">
      <li><a href="#interpolating-images"><span class="secno">7.1</span> <span class="content">Interpolating <span class="production">&lt;image></span></span></a>
      <li><a href="#interpolating-image-combinations"><span class="secno">7.2</span> <span class="content">Interpolating cross-fade()</span></a>
      <li><a href="#interpolating-gradients"><span class="secno">7.3</span> <span class="content">Interpolating <span class="production">&lt;gradient></span></span></a>
     </ol>
    <li><a href="#serialization"><span class="secno">8</span> <span class="content">Serialization</span></a>
    <li><a href="#privsec"><span class="secno">9</span> <span class="content">Privacy and Security Considerations</span></a>
    <li>
     <a href="#changes"><span class="secno">10</span> <span class="content">Changes</span></a>
     <ol class="toc">
      <li><a href="#changes-20120911"><span class="secno"></span> <span class="content"> Changes Since the <span>11 September 2012 Working Draft</span></span></a>
      <li><a href="#changes-3"><span class="secno"></span> <span class="content"> Changes Since Level 3</span></a>
     </ol>
    <li>
     <a href="#conformance"><span class="secno"></span> <span class="content"> Conformance</span></a>
     <ol class="toc">
      <li><a href="#document-conventions"><span class="secno"></span> <span class="content"> Document conventions</span></a>
      <li><a href="#conform-classes"><span class="secno"></span> <span class="content"> Conformance classes</span></a>
      <li>
       <a href="#conform-responsible"><span class="secno"></span> <span class="content"> Requirements for Responsible Implementation of CSS</span></a>
       <ol class="toc">
        <li><a href="#conform-partial"><span class="secno"></span> <span class="content"> Partial Implementations</span></a>
        <li><a href="#conform-future-proofing"><span class="secno"></span> <span class="content"> Implementations of Unstable and Proprietary Features</span></a>
        <li><a href="#conform-testing"><span class="secno"></span> <span class="content"> Implementations of CR-level Features</span></a>
       </ol>
     </ol>
    <li>
     <a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
     <ol class="toc">
      <li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
      <li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
     </ol>
    <li>
     <a href="#references"><span class="secno"></span> <span class="content">References</span></a>
     <ol class="toc">
      <li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
      <li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
     </ol>
    <li><a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a>
    <li><a href="#idl-index"><span class="secno"></span> <span class="content">IDL Index</span></a>
    <li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
   </ol>
  </nav>
  <main>
   <h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </span><span class="content">Introduction</span><a class="self-link" href="#intro"></a></h2>
   <p><em>This section is not normative.</em></p>
   <p>This module introduces additional ways of representing 2D images,
	for example as <a href="#image-notation">a URL with color fallback</a>,
	as <a href="#conic-gradients">conic gradients</a>,
	or as the <a href="#element-notation">rendering of another element in the document</a>.</p>
   <h2 class="heading settled" data-level="2" id="image-values"><span class="secno">2. </span><span class="content">2D Image Values: the <a class="production css" data-link-type="type" href="#typedef-image" id="ref-for-typedef-image②">&lt;image></a> type</span><a class="self-link" href="#image-values"></a></h2>
   <p>The <a class="production css" data-link-type="type" href="#typedef-image" id="ref-for-typedef-image③">&lt;image></a> value type denotes a 2D image. It can be a <a href="#url-notation">url reference</a>, <a href="#image-notation">image notation</a>,
	or <a href="#gradients">gradient notation</a>.
	Its syntax is:</p>
<pre class="prod"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-image">&lt;image></dfn> = <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#url-value" id="ref-for-url-value">&lt;url></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one">|</a> <a class="production" data-link-type="function" href="#funcdef-image" id="ref-for-funcdef-image①">&lt;image()></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①">|</a> <a class="production" data-link-type="function" href="#funcdef-image-set" id="ref-for-funcdef-image-set">&lt;image-set()></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one②">|</a> <a class="production" data-link-type="function" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade">&lt;cross-fade()></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one③">|</a> <a class="production" data-link-type="type" href="#typedef-gradient" id="ref-for-typedef-gradient">&lt;gradient></a></pre>
   <p>An <a class="production css" data-link-type="type" href="#typedef-image" id="ref-for-typedef-image④">&lt;image></a> can be used in many CSS properties,
	including the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-image" id="ref-for-propdef-background-image">background-image</a>, <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-lists-3/#propdef-list-style-image" id="ref-for-propdef-list-style-image">list-style-image</a>, <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-ui-4/#propdef-cursor" id="ref-for-propdef-cursor">cursor</a> properties <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a> (where it replaces the <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#url-value" id="ref-for-url-value①">&lt;url></a> component in the property’s value).</p>
   <p>In some cases an image is invalid,
	such as a <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#url-value" id="ref-for-url-value②">&lt;url></a> pointing to a resource that is not a valid image format
	or that has failed to load.
	An <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="invalid image|valid image" id="invalid-image">invalid image</dfn> is rendered as a solid-color <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-color-4/#valdef-color-transparent" id="ref-for-valdef-color-transparent">transparent</a> image with no intrinsic dimensions.
	However, <a data-link-type="dfn" href="#invalid-image" id="ref-for-invalid-image">invalid images</a> can trigger error-handling clauses
	in some contexts.
	For example, an <span id="ref-for-invalid-image①">invalid image</span> in <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-lists-3/#propdef-list-style-image" id="ref-for-propdef-list-style-image①">list-style-image</a> is treated as <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-lists-3/#valdef-list-style-type-none" id="ref-for-valdef-list-style-type-none">none</a>,
	allowing the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-lists-3/#propdef-list-style-type" id="ref-for-propdef-list-style-type">list-style-type</a> to render in its place. <a data-link-type="biblio" href="#biblio-css21">[CSS2]</a></p>
   <p>While an image is loading,
	is is a <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="loading-image">loading image</dfn>. <a data-link-type="dfn" href="#loading-image" id="ref-for-loading-image">Loading images</a> are <em>not</em> <a data-link-type="dfn" href="#invalid-image" id="ref-for-invalid-image②">invalid images</a>,
	but have similar behavior:
	they are rendered as a solid-color <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-color-4/#valdef-color-transparent" id="ref-for-valdef-color-transparent①">transparent</a> image with no intrinsic dimensions,
	and may trigger fallback rendering in contexts that offer it,
	but must not trigger loading of fallback resources.
	Alternately, if a <span id="ref-for-loading-image①">loading image</span> happens to be replacing
	an already-loaded image
	(for example due to changes in the document or style sheet)
	and the UA is tracking this information,
	it may continue to render the already-loaded image
	in place of the <span id="ref-for-loading-image②">loading image</span>.</p>
   <p>Partially-loaded images (whose <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#intrinsic-dimensions" id="ref-for-intrinsic-dimensions">intrinsic dimensions</a> are known, but whose image data is not fully loaded)
	may be either treated as <a data-link-type="dfn" href="#loading-image" id="ref-for-loading-image③">loading images</a> or as loaded images rendered with partial data.
	For example, a UA may render an interlaced GIF in place
	as soon as its first pass of pixel data has loaded
	or even as soon as the image header (which contains sizing data) has parsed
	and refresh the rendering as more data loads;
	or it may wait until the entire image has loaded before using it.</p>
   <p>A <dfn data-dfn-type="dfn" data-export id="computed-image"><a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-4/#computed-value" id="ref-for-computed-value">computed</a> <a class="production css" data-link-type="type" href="#typedef-image" id="ref-for-typedef-image⑤">&lt;image></a><a class="self-link" href="#computed-image"></a></dfn> value
	is the <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-4/#specified-value" id="ref-for-specified-value">specified value</a> with any <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#url-value" id="ref-for-url-value③">&lt;url></a>s, <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-color-3/#valuea-def-color" id="ref-for-valuea-def-color" title="Expands to: indigo | gold | firebrick | indianred | yellow | darkolivegreen | darkseagreen | slategrey | darkslategrey | mediumvioletred | mediumorchid | transparent | chartreuse | mediumslateblue | black | springgreen | crimson | lightsalmon | brown | turquoise | olivedrab | cyan | silver | skyblue | gray | darkturquoise | goldenrod | darkgreen | darkviolet | darkgray | lightpink | teal | darkmagenta | lightgoldenrodyellow | lavender | yellowgreen | thistle | violet | navy | dimgrey | orchid | blue | ghostwhite | honeydew | cornflowerblue | darkblue | darkkhaki | mediumpurple | cornsilk | red | bisque | slategray | darkcyan | khaki | wheat | deepskyblue | rebeccapurple | darkred | steelblue | aliceblue | lightslategrey | gainsboro | mediumturquoise | floralwhite | coral | purple | lightgrey | lightcyan | darksalmon | beige | azure | lightsteelblue | oldlace | greenyellow | royalblue | lightseagreen | mistyrose | sienna | lightcoral | orangered | navajowhite | lime | palegreen | burlywood | seashell | mediumspringgreen | fuchsia | papayawhip | blanchedalmond | peru | aquamarine | white | darkslategray | tomato | ivory | dodgerblue | currentcolor | lemonchiffon | chocolate | orange | forestgreen | darkgrey | olive | mintcream | antiquewhite | darkorange | cadetblue | moccasin | limegreen | saddlebrown | grey | darkslateblue | lightskyblue | deeppink | plum | aqua | darkgoldenrod | maroon | sandybrown | magenta | tan | rosybrown | pink | lightblue | palevioletred | mediumseagreen | slateblue | dimgray | powderblue | seagreen | snow | mediumblue | midnightblue | paleturquoise | palegoldenrod | whitesmoke | darkorchid | salmon | lightslategray | lawngreen | lightgreen | lightgray | hotpink | lightyellow | lavenderblush | linen | mediumaquamarine | green | blueviolet | peachpuff">&lt;color></a>s, and <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value" id="ref-for-length-value" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a>s computed.</p>
   <h3 class="heading settled" data-level="2.1" id="image-file-formats"><span class="secno">2.1. </span><span class="content">Image File Formats</span><a class="self-link" href="#image-file-formats"></a></h3>
   <p>At minimum, the UA must support the following image file formats
when referenced from an <a class="production css" data-link-type="type" href="#typedef-image" id="ref-for-typedef-image⑥">&lt;image></a> value,
for all the properties in which using <span class="production" id="ref-for-typedef-image⑦">&lt;image></span> is valid:</p>
   <ul>
    <li>PNG, as specified in <a data-link-type="biblio" href="#biblio-png">[PNG]</a> 
    <li>SVG, as specified in <a data-link-type="biblio" href="#biblio-svg11">[SVG11]</a>,
	using the <a href="https://www.w3.org/TR/svg-integration/#secure-static-mode">secure static mode</a> (See <a data-link-type="biblio" href="#biblio-svg-integration">[SVG-INTEGRATION]</a>) 
    <li>If the UA supports animated <a class="production css" data-link-type="type" href="#typedef-image" id="ref-for-typedef-image⑧">&lt;image></a>s,
	SVG, as specified in <a data-link-type="biblio" href="#biblio-svg11">[SVG11]</a>,
	using the <a href="https://www.w3.org/TR/svg-integration/#secure-animated-mode">secure animated mode</a> (See <a data-link-type="biblio" href="#biblio-svg-integration">[SVG-INTEGRATION]</a>) 
   </ul>
   <p>The UA may support other file formats as well.</p>
   <h3 class="heading settled" data-level="2.2" id="url-notation"><span class="secno">2.2. </span><span class="content">Image References: the <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-4/#funcdef-url" id="ref-for-funcdef-url">url()</a> notation</span><a class="self-link" href="#url-notation"></a></h3>
   <p class="note" role="note"><span>Note:</span> No change from <a data-link-type="biblio" href="#biblio-css3-images">[css3-images]</a>.</p>
   <h3 class="heading settled" data-level="2.3" id="image-set-notation"><span class="secno">2.3. </span><span class="content">Resolution Negotiation: the <a class="css" data-link-type="maybe" href="#funcdef-image-set" id="ref-for-funcdef-image-set①">image-set()</a> notation</span><a class="self-link" href="#image-set-notation"></a></h3>
   <p>Delivering the most appropriate image resolution for a user’s device can be a difficult task.
	Ideally, images should be in the same resolution as the device they’re being viewed in,
	which can vary between users.
	However, other factors can factor into the decision of which image to send;
	for example, if the user is on a slow mobile connection,
	they may prefer to receive lower-res images
	rather than waiting for a large proper-res image to load.
	The <a class="css" data-link-type="maybe" href="#funcdef-image-set" id="ref-for-funcdef-image-set②">image-set()</a> function allows an author to ignore most of these issues,
	simply providing multiple resolutions of an image
	and letting the UA decide which is most appropriate in a given situation.</p>
   <p class="issue" id="issue-86c01534"><a class="self-link" href="#issue-86c01534"></a> This solution assumes that resolution is a proxy for filesize,
	and therefore doesn’t appropriately handle multi-resolution sets of vector images,
	or mixing vector images with raster ones (e.g. for icons).
	For example, use a vector for high-res,
	pixel-optimized bitmap for low-res,
	and same vector again for low-bandwidth (because it’s much smaller, even though it’s higher resolution).</p>
   <p>The syntax for <a class="css" data-link-type="maybe" href="#funcdef-image-set" id="ref-for-funcdef-image-set③">image-set()</a> is:</p>
<pre class="prod"><dfn class="caniuse-paneled dfn-paneled" data-dfn-type="function" data-export id="funcdef-image-set">image-set()</dfn> = image-set( <a class="production" data-link-type="type" href="#typedef-image-set-option" id="ref-for-typedef-image-set-option">&lt;image-set-option></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma">#</a> )
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-image-set-option">&lt;image-set-option></dfn> = [ <a class="production" data-link-type="type" href="#typedef-image" id="ref-for-typedef-image⑨">&lt;image></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one④">|</a> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#string-value" id="ref-for-string-value">&lt;string></a> ] <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#resolution-value" id="ref-for-resolution-value" title="Expands to: dppx | x | dpcm | dpi">&lt;resolution></a>
</pre>
   <p class="issue" id="issue-8fea40a4"><a class="self-link" href="#issue-8fea40a4"></a> We should add "w" and "h" dimensions as a possibility, and a "format()" function,
	to match the functionality of HTML’s <a data-link-type="element" href="https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element" id="ref-for-the-picture-element">picture</a>.</p>
   <p>The <a class="css" data-link-type="maybe" href="#funcdef-image-set" id="ref-for-funcdef-image-set④">image-set()</a> function can not be nested inside of itself,
	either directly
	or indirectly
	(as an argument to another <a class="production css" data-link-type="type" href="#typedef-image" id="ref-for-typedef-image①⓪">&lt;image></a> type).</p>
   <p class="issue" id="issue-92756fb8"><a class="self-link" href="#issue-92756fb8"></a> Is this restriction needed?</p>
   <p>Each <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#string-value" id="ref-for-string-value①">&lt;string></a> inside <a class="css" data-link-type="maybe" href="#funcdef-image-set" id="ref-for-funcdef-image-set⑤">image-set()</a> represents a <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#url-value" id="ref-for-url-value④">&lt;url></a>.</p>
   <p>Every <a class="production css" data-link-type="type" href="#typedef-image-set-option" id="ref-for-typedef-image-set-option①">&lt;image-set-option></a> in a given <a class="css" data-link-type="maybe" href="#funcdef-image-set" id="ref-for-funcdef-image-set⑥">image-set()</a> must have a different <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#resolution-value" id="ref-for-resolution-value①" title="Expands to: dppx | x | dpcm | dpi">&lt;resolution></a>,
	or else the function is invalid.</p>
   <p>UAs must make a UA-specific choice of which <a class="production css" data-link-type="type" href="#typedef-image-set-option" id="ref-for-typedef-image-set-option②">&lt;image-set-option></a> to load,
	based on whatever criteria they find relevant
	(such as the resolution of the display,
		connection speed,
		etc).
	The <a class="css" data-link-type="maybe" href="#funcdef-image-set" id="ref-for-funcdef-image-set⑦">image-set()</a> then represents the image associated with the URL of that choice.
	The image’s <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-4/#intrinsic-resolution" id="ref-for-intrinsic-resolution">intrinsic resolution</a> is the resolution associated with that choice.
	UAs <strong>may</strong> change which <span class="production" id="ref-for-typedef-image-set-option③">&lt;image-set-option></span> they wish to use for a given <span class="css" id="ref-for-funcdef-image-set⑧">image-set()</span> over the lifetime of the page,
	if the criteria used to determine which option to choose change significantly enough to make it worthwhile in the UA’s estimation.</p>
   <div class="example" id="example-03475a91">
    <a class="self-link" href="#example-03475a91"></a> This example shows how to use <a class="css" data-link-type="maybe" href="#funcdef-image-set" id="ref-for-funcdef-image-set⑨">image-set()</a> to provide an image in three versions:
		a "normal" version,
		a "high-res" version,
		and an extra-high resolution version for use in high-quality printing
		(as printers can have <em>extremely</em> high resolution): 
<pre>background-image: image-set( "foo.png" 1x,
                             "foo-2x.png" 2x,
                             "foo-print.png" 600dpi );
</pre>
   </div>
   <h3 class="heading settled" data-level="2.4" id="image-notation"><span class="secno">2.4. </span><span class="content">Image Fallbacks and Annotations: the <a class="css" data-link-type="maybe" href="#funcdef-image" id="ref-for-funcdef-image②">image()</a> notation</span><a class="self-link" href="#image-notation"></a></h3>
   <p>The <a class="css" data-link-type="maybe" href="#funcdef-image" id="ref-for-funcdef-image③">image()</a> function allows an author to:</p>
   <ul>
    <li data-md>
     <p>use <a href="https://www.w3.org/TR/media-frags/">media fragments</a> to clip out a portion of an image</p>
    <li data-md>
     <p>use a solid color as an image</p>
    <li data-md>
     <p>fallback to a solid-color image, when the image at the specified url can’t be downloaded or decoded</p>
    <li data-md>
     <p>automatically respect the image orientation specified in the image’s metadata</p>
   </ul>
   <p>The <a class="css" data-link-type="maybe" href="#funcdef-image" id="ref-for-funcdef-image④">image()</a> notation is defined as:</p>
<pre class="prod"><dfn class="dfn-paneled" data-dfn-type="function" data-export id="funcdef-image">image()</dfn> = image( <a class="production" data-link-type="type" href="#typedef-image-tags" id="ref-for-typedef-image-tags">&lt;image-tags></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt">?</a> [ <a class="production" data-link-type="type" href="#typedef-image-src" id="ref-for-typedef-image-src">&lt;image-src></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt①">?</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-comma" id="ref-for-comb-comma">,</a> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-color-3/#valuea-def-color" id="ref-for-valuea-def-color①" title="Expands to: indigo | gold | firebrick | indianred | yellow | darkolivegreen | darkseagreen | slategrey | darkslategrey | mediumvioletred | mediumorchid | transparent | chartreuse | mediumslateblue | black | springgreen | crimson | lightsalmon | brown | turquoise | olivedrab | cyan | silver | skyblue | gray | darkturquoise | goldenrod | darkgreen | darkviolet | darkgray | lightpink | teal | darkmagenta | lightgoldenrodyellow | lavender | yellowgreen | thistle | violet | navy | dimgrey | orchid | blue | ghostwhite | honeydew | cornflowerblue | darkblue | darkkhaki | mediumpurple | cornsilk | red | bisque | slategray | darkcyan | khaki | wheat | deepskyblue | rebeccapurple | darkred | steelblue | aliceblue | lightslategrey | gainsboro | mediumturquoise | floralwhite | coral | purple | lightgrey | lightcyan | darksalmon | beige | azure | lightsteelblue | oldlace | greenyellow | royalblue | lightseagreen | mistyrose | sienna | lightcoral | orangered | navajowhite | lime | palegreen | burlywood | seashell | mediumspringgreen | fuchsia | papayawhip | blanchedalmond | peru | aquamarine | white | darkslategray | tomato | ivory | dodgerblue | currentcolor | lemonchiffon | chocolate | orange | forestgreen | darkgrey | olive | mintcream | antiquewhite | darkorange | cadetblue | moccasin | limegreen | saddlebrown | grey | darkslateblue | lightskyblue | deeppink | plum | aqua | darkgoldenrod | maroon | sandybrown | magenta | tan | rosybrown | pink | lightblue | palevioletred | mediumseagreen | slateblue | dimgray | powderblue | seagreen | snow | mediumblue | midnightblue | paleturquoise | palegoldenrod | whitesmoke | darkorchid | salmon | lightslategray | lawngreen | lightgreen | lightgray | hotpink | lightyellow | lavenderblush | linen | mediumaquamarine | green | blueviolet | peachpuff">&lt;color></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt②">?</a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-req" id="ref-for-mult-req">!</a> )
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-image-tags">&lt;image-tags></dfn> = [ ltr <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑤">|</a> rtl ]
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-image-src">&lt;image-src></dfn> = [ <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#url-value" id="ref-for-url-value⑤">&lt;url></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑥">|</a> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#string-value" id="ref-for-string-value②">&lt;string></a> ]
</pre>
   <p>A <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#string-value" id="ref-for-string-value③">&lt;string></a> used in <a class="css" data-link-type="maybe" href="#funcdef-image" id="ref-for-funcdef-image⑤">image()</a> represents a <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#url-value" id="ref-for-url-value⑥">&lt;url></a>.
	As usual for URLs in CSS,
	relative URLs are resolved to an absolute URL
	(as described in Values &amp; Units <a data-link-type="biblio" href="#biblio-css-values-3">[css-values-3]</a>)
	when a specified <span class="css" id="ref-for-funcdef-image⑥">image()</span> value is computed.</p>
   <p>If the image has an orientation specified in its metadata,
	such as EXIF,
	the UA must rotate or flip the image to correctly orient it
	as the metadata specifies.</p>
   <h4 class="heading settled" data-level="2.4.1" id="image-fallbacks"><span class="secno">2.4.1. </span><span class="content">Image Fallbacks</span><a class="self-link" href="#image-fallbacks"></a></h4>
   <p>If both a URL and a <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-color-3/#valuea-def-color" id="ref-for-valuea-def-color②" title="Expands to: indigo | gold | firebrick | indianred | yellow | darkolivegreen | darkseagreen | slategrey | darkslategrey | mediumvioletred | mediumorchid | transparent | chartreuse | mediumslateblue | black | springgreen | crimson | lightsalmon | brown | turquoise | olivedrab | cyan | silver | skyblue | gray | darkturquoise | goldenrod | darkgreen | darkviolet | darkgray | lightpink | teal | darkmagenta | lightgoldenrodyellow | lavender | yellowgreen | thistle | violet | navy | dimgrey | orchid | blue | ghostwhite | honeydew | cornflowerblue | darkblue | darkkhaki | mediumpurple | cornsilk | red | bisque | slategray | darkcyan | khaki | wheat | deepskyblue | rebeccapurple | darkred | steelblue | aliceblue | lightslategrey | gainsboro | mediumturquoise | floralwhite | coral | purple | lightgrey | lightcyan | darksalmon | beige | azure | lightsteelblue | oldlace | greenyellow | royalblue | lightseagreen | mistyrose | sienna | lightcoral | orangered | navajowhite | lime | palegreen | burlywood | seashell | mediumspringgreen | fuchsia | papayawhip | blanchedalmond | peru | aquamarine | white | darkslategray | tomato | ivory | dodgerblue | currentcolor | lemonchiffon | chocolate | orange | forestgreen | darkgrey | olive | mintcream | antiquewhite | darkorange | cadetblue | moccasin | limegreen | saddlebrown | grey | darkslateblue | lightskyblue | deeppink | plum | aqua | darkgoldenrod | maroon | sandybrown | magenta | tan | rosybrown | pink | lightblue | palevioletred | mediumseagreen | slateblue | dimgray | powderblue | seagreen | snow | mediumblue | midnightblue | paleturquoise | palegoldenrod | whitesmoke | darkorchid | salmon | lightslategray | lawngreen | lightgreen | lightgray | hotpink | lightyellow | lavenderblush | linen | mediumaquamarine | green | blueviolet | peachpuff">&lt;color></a> are specified in <a class="css" data-link-type="maybe" href="#funcdef-image" id="ref-for-funcdef-image⑦">image()</a>,
	then whenever the URL represents an <a data-link-type="dfn" href="#invalid-image" id="ref-for-invalid-image③">invalid image</a> or <a data-link-type="dfn" href="#loading-image" id="ref-for-loading-image④">loading image</a>,
	the <span class="css" id="ref-for-funcdef-image⑧">image()</span> function renders as if the URL were not specified at all;
	it generates a solid-color image as specified in <a href="#color-images">§ 2.4.3 Solid-color Images</a>.</p>
   <p>If just a URL is specified (no <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-color-3/#valuea-def-color" id="ref-for-valuea-def-color③" title="Expands to: indigo | gold | firebrick | indianred | yellow | darkolivegreen | darkseagreen | slategrey | darkslategrey | mediumvioletred | mediumorchid | transparent | chartreuse | mediumslateblue | black | springgreen | crimson | lightsalmon | brown | turquoise | olivedrab | cyan | silver | skyblue | gray | darkturquoise | goldenrod | darkgreen | darkviolet | darkgray | lightpink | teal | darkmagenta | lightgoldenrodyellow | lavender | yellowgreen | thistle | violet | navy | dimgrey | orchid | blue | ghostwhite | honeydew | cornflowerblue | darkblue | darkkhaki | mediumpurple | cornsilk | red | bisque | slategray | darkcyan | khaki | wheat | deepskyblue | rebeccapurple | darkred | steelblue | aliceblue | lightslategrey | gainsboro | mediumturquoise | floralwhite | coral | purple | lightgrey | lightcyan | darksalmon | beige | azure | lightsteelblue | oldlace | greenyellow | royalblue | lightseagreen | mistyrose | sienna | lightcoral | orangered | navajowhite | lime | palegreen | burlywood | seashell | mediumspringgreen | fuchsia | papayawhip | blanchedalmond | peru | aquamarine | white | darkslategray | tomato | ivory | dodgerblue | currentcolor | lemonchiffon | chocolate | orange | forestgreen | darkgrey | olive | mintcream | antiquewhite | darkorange | cadetblue | moccasin | limegreen | saddlebrown | grey | darkslateblue | lightskyblue | deeppink | plum | aqua | darkgoldenrod | maroon | sandybrown | magenta | tan | rosybrown | pink | lightblue | palevioletred | mediumseagreen | slateblue | dimgray | powderblue | seagreen | snow | mediumblue | midnightblue | paleturquoise | palegoldenrod | whitesmoke | darkorchid | salmon | lightslategray | lawngreen | lightgreen | lightgray | hotpink | lightyellow | lavenderblush | linen | mediumaquamarine | green | blueviolet | peachpuff">&lt;color></a>)
	and it represents an <a data-link-type="dfn" href="#invalid-image" id="ref-for-invalid-image④">invalid image</a> or <a data-link-type="dfn" href="#loading-image" id="ref-for-loading-image⑤">loading image</a>,
	the <a class="css" data-link-type="maybe" href="#funcdef-image" id="ref-for-funcdef-image⑨">image()</a> function represents the same.</p>
   <div class="example" id="example-33b17fe8">
    <a class="self-link" href="#example-33b17fe8"></a> The fallback color can be used to ensure that text is still readable
		even when the image fails to load.
		For example, the following legacy code works fine if the image is rectangular and has no transparency: 
<pre class="lang-css highlight"><c- f>body      </c-><c- p>{</c-> <c- k>color</c-><c- p>:</c-> black<c- p>;</c-> <c- k>background</c-><c- p>:</c-> white<c- p>;</c-> <c- p>}</c->
<c- f>p.special </c-><c- p>{</c-> <c- k>color</c-><c- p>:</c-> white<c- p>;</c-> <c- k>background</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>"dark.png"</c-><c- p>)</c-> black<c- p>;</c-> <c- p>}</c->
</pre>
    <p>When the image doesn’t load,
		the background color is still there to ensure that the white text is readable.
		However, if the image has some transparency,
		the black will be visible behind it,
		which is probably not desired.
		The <a class="css" data-link-type="maybe" href="#funcdef-image" id="ref-for-funcdef-image①⓪">image()</a> function addresses this:</p>
<pre class="lang-css highlight"><c- f>body      </c-><c- p>{</c-> <c- k>color</c-><c- p>:</c-> black<c- p>;</c-> <c- k>background</c-><c- p>:</c-> white<c- p>;</c-> <c- p>}</c->
<c- f>p.special </c-><c- p>{</c-> <c- k>color</c-><c- p>:</c-> white<c- p>;</c-> <c- k>background</c-><c- p>:</c-> <c- nf>image</c-><c- p>(</c-><c- s>"dark.png"</c-><c- p>,</c-> black<c- p>);</c-> <c- p>}</c->
</pre>
    <p>Now, the black won’t show at all if the image loads,
		but if for whatever reason the image fails,
		it’ll pop in and prevent the white text from being set against a white background.</p>
   </div>
   <h4 class="heading settled" data-level="2.4.2" id="image-fragments"><span class="secno">2.4.2. </span><span class="content">Image Fragments</span><a class="self-link" href="#image-fragments"></a></h4>
   <p>When a URL specified in <a class="css" data-link-type="maybe" href="#funcdef-image" id="ref-for-funcdef-image①①">image()</a> represents a portion of a resource
	(e.g. by the use of <a href="https://www.w3.org/TR/media-frags/#naming-space">media fragment identifiers</a>)
	that portion is clipped out of its context and used as a standalone image.</p>
   <div class="example" id="example-036516b1">
    <a class="self-link" href="#example-036516b1"></a> For example, given the following image and CSS: 
    <p><a href="images/sprites.svg"> <img alt="[9 circles, with 0 to 8 eighths filled in]" height="20" src="images/sprites.svg" width="180"> </a></p>
<pre class="lang-css highlight">background-image: image('sprites.svg#xywh=40,0,20,20')</pre>
    <p>...the background of the element will be the portion of the image that starts at (40px,0px) and is 20px wide and tall,
		which is just the circle with a quarter filled in.</p>
   </div>
   <p>So that authors can take advantage of CSS’s forwards-compatible parsing rules to provide a fallback for image slices,
	implementations that support the <a class="css" data-link-type="maybe" href="#funcdef-image" id="ref-for-funcdef-image①②">image()</a> notation <em>must</em> support the <code>xywh=#,#,#,#</code> form of media fragment identifiers
	for images specified via <span class="css" id="ref-for-funcdef-image①③">image()</span>. <a data-link-type="biblio" href="#biblio-media-frags">[MEDIA-FRAGS]</a></p>
   <div class="example" id="example-3f0fa76f">
    <a class="self-link" href="#example-3f0fa76f"></a> Note that image fragments can also be used with the <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-4/#funcdef-url" id="ref-for-funcdef-url①">url()</a> notation.
		However, a legacy UA that doesn’t understand the media fragments notation
		will ignore the fragment and simply display the entirety of the image. 
    <p>Since the <a class="css" data-link-type="maybe" href="#funcdef-image" id="ref-for-funcdef-image①④">image()</a> notation requires UAs to support media fragments,
		authors can take advantage of CSS’s forward-compatible parsing rules
		to provide a fallback when using an image fragment URL:</p>
<pre class="lang-css highlight">background-image: url('swirl.png'); <c- c>/* old UAs */</c->
background-image: image('sprites.png#xywh=10,30,60,20'); <c- c>/* new UAs */</c->
</pre>
   </div>
   <p>If a URL uses a fragment identifier syntax that the implementation does not understand,
	or does not consider valid for that type of image,
	the URL must be treated as representing an <a data-link-type="dfn" href="#invalid-image" id="ref-for-invalid-image⑤">invalid image</a>.</p>
   <p class="note" role="note"><span>Note:</span> This error-handling is limited to <a class="css" data-link-type="maybe" href="#funcdef-image" id="ref-for-funcdef-image①⑤">image()</a>,
	and not in the definition of URL,
	for legacy compat reasons.</p>
   <h4 class="heading settled" data-level="2.4.3" id="color-images"><span class="secno">2.4.3. </span><span class="content">Solid-color Images</span><a class="self-link" href="#color-images"></a></h4>
   <p>If the <a class="css" data-link-type="maybe" href="#funcdef-image" id="ref-for-funcdef-image①⑥">image()</a> function is specified with only a <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-color-3/#valuea-def-color" id="ref-for-valuea-def-color④" title="Expands to: indigo | gold | firebrick | indianred | yellow | darkolivegreen | darkseagreen | slategrey | darkslategrey | mediumvioletred | mediumorchid | transparent | chartreuse | mediumslateblue | black | springgreen | crimson | lightsalmon | brown | turquoise | olivedrab | cyan | silver | skyblue | gray | darkturquoise | goldenrod | darkgreen | darkviolet | darkgray | lightpink | teal | darkmagenta | lightgoldenrodyellow | lavender | yellowgreen | thistle | violet | navy | dimgrey | orchid | blue | ghostwhite | honeydew | cornflowerblue | darkblue | darkkhaki | mediumpurple | cornsilk | red | bisque | slategray | darkcyan | khaki | wheat | deepskyblue | rebeccapurple | darkred | steelblue | aliceblue | lightslategrey | gainsboro | mediumturquoise | floralwhite | coral | purple | lightgrey | lightcyan | darksalmon | beige | azure | lightsteelblue | oldlace | greenyellow | royalblue | lightseagreen | mistyrose | sienna | lightcoral | orangered | navajowhite | lime | palegreen | burlywood | seashell | mediumspringgreen | fuchsia | papayawhip | blanchedalmond | peru | aquamarine | white | darkslategray | tomato | ivory | dodgerblue | currentcolor | lemonchiffon | chocolate | orange | forestgreen | darkgrey | olive | mintcream | antiquewhite | darkorange | cadetblue | moccasin | limegreen | saddlebrown | grey | darkslateblue | lightskyblue | deeppink | plum | aqua | darkgoldenrod | maroon | sandybrown | magenta | tan | rosybrown | pink | lightblue | palevioletred | mediumseagreen | slateblue | dimgray | powderblue | seagreen | snow | mediumblue | midnightblue | paleturquoise | palegoldenrod | whitesmoke | darkorchid | salmon | lightslategray | lawngreen | lightgreen | lightgray | hotpink | lightyellow | lavenderblush | linen | mediumaquamarine | green | blueviolet | peachpuff">&lt;color></a> argument (no URL),
	it represents a solid-color image of the specified color with no intrinsic dimensions.</p>
   <div class="example" id="example-393a50db">
    <a class="self-link" href="#example-393a50db"></a> For example,
		one can use this as a simple way to "tint" a background image,
		by overlaying a partially-transparent color over the top of the other image: 
<pre class="lang-css highlight">background-image: image(rgba(0,0,255,.5)), url("bg-image.png");</pre>
    <p><a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-color" id="ref-for-propdef-background-color">background-color</a> does not work for this,
		as the solid color it generates always lies <em>beneath</em> all the background images.</p>
   </div>
   <h4 class="heading settled" data-level="2.4.4" id="bidi-images"><span class="secno">2.4.4. </span><span class="content">Bidi-sensitive Images</span><a class="self-link" href="#bidi-images"></a></h4>
   <p>Before listing any <code>&lt;image-src>s</code>,
	the author may specify a directionality for the image,
	similar to adding a <code>dir</code> attribute to an element in HTML.
	If a directional image is used on or in an element with opposite <a href="https://www.w3.org/TR/CSS21/visuren.html#propdef-direction">direction</a>,
	the image must be flipped in the inline direction
	(as if it was transformed by, e.g., <code>scaleX(-1)</code>, if the inline direction is the X axis).</p>
   <p class="note" role="note"><span>Note:</span> Absent this declaration,
	images default to no directionality at all,
	and thus don’t care about the directionality of the surrounding element.</p>
   <div class="example" id="example-32804d47">
    <a class="self-link" href="#example-32804d47"></a> A list may use an arrow for a bullet that points into the content.
		If the list can contain both LTR and RTL text,
		though, the bullet may be on the left or the right,
		and an image designed to point into the text on one side will point out of the text on the other side.
		This can be fixed with code like: 
<pre class="lang-html highlight"><c- p>&lt;</c-><c- f>ul</c-> <c- e>style</c-><c- o>=</c-><c- s>"list-style-image: image(ltr 'arrow.png');"</c-><c- p>></c->
  <c- p>&lt;</c-><c- f>li</c-> <c- e>dir</c-><c- o>=</c-><c- s>'ltr'</c-><c- p>></c->My bullet is on the left!<c- p>&lt;/</c-><c- f>li</c-><c- p>></c->
  <c- p>&lt;</c-><c- f>li</c-> <c- e>dir</c-><c- o>=</c-><c- s>'rtl'</c-><c- p>></c->MY BULLET IS ON THE RIGHT!<c- p>&lt;/</c-><c- f>li</c-><c- p>></c->
<c- p>&lt;/</c-><c- f>ul</c-><c- p>></c->
</pre>
    <p>This should render something like:</p>
<pre class="lang-html highlight">⇒ My bullet is on the left!
  !THGIR EHT NO SI TELLUB YM ⇐
</pre>
    <p>In LTR list items, the image will be used as-is.
		In the RTL list items, however,
		it will be flipped in the inline direction,
		so it still points into the content.</p>
   </div>
   <h3 class="heading settled" data-level="2.5" id="cross-fade-function"><span class="secno">2.5. </span><span class="content">Combining images: the <a class="css" data-link-type="maybe" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade①">cross-fade()</a> notation</span><a class="self-link" href="#cross-fade-function"></a></h3>
   <p>When transitioning between images,
	CSS requires a way to explicitly refer to the intermediate image
	that is a combination of the start and end images.
	This is accomplished with the <a class="css" data-link-type="maybe" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade②">cross-fade()</a> function,
	which indicates the two images to be combined
	and how far along in the transition the combination is.</p>
   <p class="note" role="note"><span>Note:</span> Authors can also use the <a class="css" data-link-type="maybe" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade③">cross-fade()</a> function for many simple image manipulations,
	such as tinting an image with a solid color
	or highlighting a particular area of the page by combining an image with a radial gradient.</p>
   <p>The syntax for <a class="css" data-link-type="maybe" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade④">cross-fade()</a> is defined as:</p>
<pre class="prod"><dfn class="caniuse-paneled dfn-paneled" data-dfn-type="function" data-export id="funcdef-cross-fade">cross-fade()</dfn> = cross-fade( <a class="production" data-link-type="type" href="#typedef-cf-image" id="ref-for-typedef-cf-image">&lt;cf-image></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma①">#</a> )
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-cf-image">&lt;cf-image></dfn> = <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#percentage-value" id="ref-for-percentage-value">&lt;percentage></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt③">?</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-all" id="ref-for-comb-all">&amp;&amp;</a> [ <a class="production" data-link-type="type" href="#typedef-image" id="ref-for-typedef-image①①">&lt;image></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑦">|</a> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-color-3/#valuea-def-color" id="ref-for-valuea-def-color⑤" title="Expands to: indigo | gold | firebrick | indianred | yellow | darkolivegreen | darkseagreen | slategrey | darkslategrey | mediumvioletred | mediumorchid | transparent | chartreuse | mediumslateblue | black | springgreen | crimson | lightsalmon | brown | turquoise | olivedrab | cyan | silver | skyblue | gray | darkturquoise | goldenrod | darkgreen | darkviolet | darkgray | lightpink | teal | darkmagenta | lightgoldenrodyellow | lavender | yellowgreen | thistle | violet | navy | dimgrey | orchid | blue | ghostwhite | honeydew | cornflowerblue | darkblue | darkkhaki | mediumpurple | cornsilk | red | bisque | slategray | darkcyan | khaki | wheat | deepskyblue | rebeccapurple | darkred | steelblue | aliceblue | lightslategrey | gainsboro | mediumturquoise | floralwhite | coral | purple | lightgrey | lightcyan | darksalmon | beige | azure | lightsteelblue | oldlace | greenyellow | royalblue | lightseagreen | mistyrose | sienna | lightcoral | orangered | navajowhite | lime | palegreen | burlywood | seashell | mediumspringgreen | fuchsia | papayawhip | blanchedalmond | peru | aquamarine | white | darkslategray | tomato | ivory | dodgerblue | currentcolor | lemonchiffon | chocolate | orange | forestgreen | darkgrey | olive | mintcream | antiquewhite | darkorange | cadetblue | moccasin | limegreen | saddlebrown | grey | darkslateblue | lightskyblue | deeppink | plum | aqua | darkgoldenrod | maroon | sandybrown | magenta | tan | rosybrown | pink | lightblue | palevioletred | mediumseagreen | slateblue | dimgray | powderblue | seagreen | snow | mediumblue | midnightblue | paleturquoise | palegoldenrod | whitesmoke | darkorchid | salmon | lightslategray | lawngreen | lightgreen | lightgray | hotpink | lightyellow | lavenderblush | linen | mediumaquamarine | green | blueviolet | peachpuff">&lt;color></a> ]
</pre>
   <p>The function represents an image generated by
	combining two or more images.</p>
   <p>The <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#percentage-value" id="ref-for-percentage-value①">&lt;percentage></a> represents how much of each image is retained
	when it is blended with the other images.
	The <span class="production" id="ref-for-percentage-value②">&lt;percentage></span> must be between <span class="css">0%</span> and <span class="css">100%</span> inclusive;
	any other value is invalid.</p>
   <p>If any percentages are omitted,
	all the specified percentages are summed together
	and subtracted from <span class="css">100%</span>,
	the result is floored at <span class="css">0%</span>,
	then divided equally between all images with omitted percentages
	at computed-value time.</p>
   <div class="note" role="note">
     While this is not reflected in the computed value,
		when all the arguments’ percentages sum to greater than <span class="css">100%</span>,
		the sizing/painting details effectively rescale them so that they sum to exactly <span class="css">100%</span>. 
    <p>On the other hand,
		when the sum is less than <span class="css">100%</span>,
		the sizing/painting details effectively act like there’s an additional <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-color-4/#valdef-color-transparent" id="ref-for-valdef-color-transparent②">transparent</a> argument,
		with its percentage set to the remaining value
		necessary to make the sum equal <span class="css">100%</span>.</p>
   </div>
   <p>If a <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-color-3/#valuea-def-color" id="ref-for-valuea-def-color⑥" title="Expands to: indigo | gold | firebrick | indianred | yellow | darkolivegreen | darkseagreen | slategrey | darkslategrey | mediumvioletred | mediumorchid | transparent | chartreuse | mediumslateblue | black | springgreen | crimson | lightsalmon | brown | turquoise | olivedrab | cyan | silver | skyblue | gray | darkturquoise | goldenrod | darkgreen | darkviolet | darkgray | lightpink | teal | darkmagenta | lightgoldenrodyellow | lavender | yellowgreen | thistle | violet | navy | dimgrey | orchid | blue | ghostwhite | honeydew | cornflowerblue | darkblue | darkkhaki | mediumpurple | cornsilk | red | bisque | slategray | darkcyan | khaki | wheat | deepskyblue | rebeccapurple | darkred | steelblue | aliceblue | lightslategrey | gainsboro | mediumturquoise | floralwhite | coral | purple | lightgrey | lightcyan | darksalmon | beige | azure | lightsteelblue | oldlace | greenyellow | royalblue | lightseagreen | mistyrose | sienna | lightcoral | orangered | navajowhite | lime | palegreen | burlywood | seashell | mediumspringgreen | fuchsia | papayawhip | blanchedalmond | peru | aquamarine | white | darkslategray | tomato | ivory | dodgerblue | currentcolor | lemonchiffon | chocolate | orange | forestgreen | darkgrey | olive | mintcream | antiquewhite | darkorange | cadetblue | moccasin | limegreen | saddlebrown | grey | darkslateblue | lightskyblue | deeppink | plum | aqua | darkgoldenrod | maroon | sandybrown | magenta | tan | rosybrown | pink | lightblue | palevioletred | mediumseagreen | slateblue | dimgray | powderblue | seagreen | snow | mediumblue | midnightblue | paleturquoise | palegoldenrod | whitesmoke | darkorchid | salmon | lightslategray | lawngreen | lightgreen | lightgray | hotpink | lightyellow | lavenderblush | linen | mediumaquamarine | green | blueviolet | peachpuff">&lt;color></a> is provided,
	it represents a solid-color image
	with “automatic” dimensions
	(it doesn’t participate in the sizing of the result image at all;
	see details in the sizing details below).</p>
   <h4 class="heading settled" data-level="2.5.1" id="cross-fade-sizing"><span class="secno">2.5.1. </span><span class="content"><a class="css" data-link-type="maybe" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade⑤">cross-fade()</a> Sizing</span><a class="self-link" href="#cross-fade-sizing"></a></h4>
   <p>The dimensions of the image represented by a <a class="css" data-link-type="maybe" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade⑥">cross-fade()</a> are a weighted average of dimensions of the <a class="production css" data-link-type="type" href="#typedef-image" id="ref-for-typedef-image①②">&lt;image></a> arguments to the function;
	the <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-color-3/#valuea-def-color" id="ref-for-valuea-def-color⑦" title="Expands to: indigo | gold | firebrick | indianred | yellow | darkolivegreen | darkseagreen | slategrey | darkslategrey | mediumvioletred | mediumorchid | transparent | chartreuse | mediumslateblue | black | springgreen | crimson | lightsalmon | brown | turquoise | olivedrab | cyan | silver | skyblue | gray | darkturquoise | goldenrod | darkgreen | darkviolet | darkgray | lightpink | teal | darkmagenta | lightgoldenrodyellow | lavender | yellowgreen | thistle | violet | navy | dimgrey | orchid | blue | ghostwhite | honeydew | cornflowerblue | darkblue | darkkhaki | mediumpurple | cornsilk | red | bisque | slategray | darkcyan | khaki | wheat | deepskyblue | rebeccapurple | darkred | steelblue | aliceblue | lightslategrey | gainsboro | mediumturquoise | floralwhite | coral | purple | lightgrey | lightcyan | darksalmon | beige | azure | lightsteelblue | oldlace | greenyellow | royalblue | lightseagreen | mistyrose | sienna | lightcoral | orangered | navajowhite | lime | palegreen | burlywood | seashell | mediumspringgreen | fuchsia | papayawhip | blanchedalmond | peru | aquamarine | white | darkslategray | tomato | ivory | dodgerblue | currentcolor | lemonchiffon | chocolate | orange | forestgreen | darkgrey | olive | mintcream | antiquewhite | darkorange | cadetblue | moccasin | limegreen | saddlebrown | grey | darkslateblue | lightskyblue | deeppink | plum | aqua | darkgoldenrod | maroon | sandybrown | magenta | tan | rosybrown | pink | lightblue | palevioletred | mediumseagreen | slateblue | dimgray | powderblue | seagreen | snow | mediumblue | midnightblue | paleturquoise | palegoldenrod | whitesmoke | darkorchid | salmon | lightslategray | lawngreen | lightgreen | lightgray | hotpink | lightyellow | lavenderblush | linen | mediumaquamarine | green | blueviolet | peachpuff">&lt;color></a> arguments have no effect.
	They are calculated as follows:</p>
   <div class="algorithm" data-algorithm="intrinsic dimensions of a cross-fade()">
     To determine the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="intrinsic-dimensions-of-a-cross-fade">intrinsic dimensions of a cross-fade()</dfn>: 
    <ol>
     <li data-md>
      <p>Let <var>images</var> be an empty list.</p>
     <li data-md>
      <p>For each <var>argument</var> of the <a class="css" data-link-type="maybe" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade⑦">cross-fade()</a> function with an <a class="production css" data-link-type="type" href="#typedef-image" id="ref-for-typedef-image①③">&lt;image></a> value:</p>
      <ol>
       <li data-md>
        <p>Let <var>item</var> be a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#tuple" id="ref-for-tuple">tuple</a> consisting of a width, a height, and a percentage.</p>
       <li data-md>
        <p>Run the <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#object-size-negotiation" id="ref-for-object-size-negotiation">object size negotiation</a> algorithm for the <a class="production css" data-link-type="type" href="#typedef-image" id="ref-for-typedef-image①④">&lt;image></a>,
as appropriate for the context in which the <a class="css" data-link-type="maybe" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade⑧">cross-fade()</a> appears,
and set <var>item</var>’s width and height
to the width and height of the resulting <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#concrete-object-size" id="ref-for-concrete-object-size">concrete object size</a>.</p>
       <li data-md>
        <p>Set <var>item</var>’s percentage to the <var>argument</var>’s percentage.</p>
      </ol>
     <li data-md>
      <p>If <var>images</var> is empty,
return no intrinsic dimensions.</p>
     <li data-md>
      <p>Let <var>percentage sum</var> be the sum of all the percentages of the <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-item" id="ref-for-list-item">items</a> in <var>images</var>.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate">For each</a> <var>item</var> in <var>images</var>,
divide <var>item</var>’s percentage by <var>percentage sum</var>,
and set <var>item</var>’s percentage to the result.</p>
      <p class="assertion">Assert: The percentages in <var>images</var> now sum to <span class="css">100%</span>.</p>
     <li data-md>
      <p>Let <var>final width</var> and <var>final height</var> be <span class="css">0px</span>.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate①">For each</a> <var>item</var> in <var>images</var>,
multiply <var>item</var>’s width by <var>item</var>’s percentage
and add the result to <var>final width</var>,
and multiply <var>item</var>’s height by <var>item</var>’s percentage
and add the result to <var>final height</var>.</p>
     <li data-md>
      <p>Return an intrinsic width of <var>final width</var> and an intrinsic height of <var>final height</var>.</p>
    </ol>
   </div>
   <h4 class="heading settled" data-level="2.5.2" id="cross-fade-painting"><span class="secno">2.5.2. </span><span class="content"><a class="css" data-link-type="maybe" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade⑨">cross-fade()</a> Painting</span><a class="self-link" href="#cross-fade-painting"></a></h4>
   <p>The image represented by a <a class="css" data-link-type="maybe" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade①⓪">cross-fade()</a> is a weighted average of the input arguments to the function,
	calculated as follows:</p>
   <div class="algorithm" data-algorithm="appearance of a cross-fade()">
     To determine the <dfn data-dfn-type="dfn" data-export id="appearance-of-a-cross-fade">appearance of a cross-fade()<a class="self-link" href="#appearance-of-a-cross-fade"></a></dfn>: 
    <ol>
     <li data-md>
      <p>Let <var>images</var> be an empty list.</p>
     <li data-md>
      <p>Let <var>size</var> be a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#tuple" id="ref-for-tuple①">tuple</a> of width and height,
initialized to the result of finding the <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#concrete-object-size" id="ref-for-concrete-object-size①">concrete object size</a> of the <a class="css" data-link-type="maybe" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade①①">cross-fade()</a> function
(using the <a data-link-type="dfn" href="#intrinsic-dimensions-of-a-cross-fade" id="ref-for-intrinsic-dimensions-of-a-cross-fade">intrinsic dimensions of a cross-fade()</a>).</p>
     <li data-md>
      <p>For each <var>argument</var> of the <a class="css" data-link-type="maybe" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade①②">cross-fade()</a> function:</p>
      <ol>
       <li data-md>
        <p>Let <var>item</var> be a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#tuple" id="ref-for-tuple②">tuple</a> consisting of an image and a percentage.</p>
       <li data-md>
        <p>If <var>argument</var> has an <a class="production css" data-link-type="type" href="#typedef-image" id="ref-for-typedef-image①⑤">&lt;image></a>,
rescale it to <var>size</var>’s width and height
and set <var>item</var>’s image to the result.
Otherwise, <var>argument</var> has a <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-color-3/#valuea-def-color" id="ref-for-valuea-def-color⑧" title="Expands to: indigo | gold | firebrick | indianred | yellow | darkolivegreen | darkseagreen | slategrey | darkslategrey | mediumvioletred | mediumorchid | transparent | chartreuse | mediumslateblue | black | springgreen | crimson | lightsalmon | brown | turquoise | olivedrab | cyan | silver | skyblue | gray | darkturquoise | goldenrod | darkgreen | darkviolet | darkgray | lightpink | teal | darkmagenta | lightgoldenrodyellow | lavender | yellowgreen | thistle | violet | navy | dimgrey | orchid | blue | ghostwhite | honeydew | cornflowerblue | darkblue | darkkhaki | mediumpurple | cornsilk | red | bisque | slategray | darkcyan | khaki | wheat | deepskyblue | rebeccapurple | darkred | steelblue | aliceblue | lightslategrey | gainsboro | mediumturquoise | floralwhite | coral | purple | lightgrey | lightcyan | darksalmon | beige | azure | lightsteelblue | oldlace | greenyellow | royalblue | lightseagreen | mistyrose | sienna | lightcoral | orangered | navajowhite | lime | palegreen | burlywood | seashell | mediumspringgreen | fuchsia | papayawhip | blanchedalmond | peru | aquamarine | white | darkslategray | tomato | ivory | dodgerblue | currentcolor | lemonchiffon | chocolate | orange | forestgreen | darkgrey | olive | mintcream | antiquewhite | darkorange | cadetblue | moccasin | limegreen | saddlebrown | grey | darkslateblue | lightskyblue | deeppink | plum | aqua | darkgoldenrod | maroon | sandybrown | magenta | tan | rosybrown | pink | lightblue | palevioletred | mediumseagreen | slateblue | dimgray | powderblue | seagreen | snow | mediumblue | midnightblue | paleturquoise | palegoldenrod | whitesmoke | darkorchid | salmon | lightslategray | lawngreen | lightgreen | lightgray | hotpink | lightyellow | lavenderblush | linen | mediumaquamarine | green | blueviolet | peachpuff">&lt;color></a>;
set <var>item</var>’s image to a solid-color image of the <span class="production" id="ref-for-valuea-def-color⑨" title="Expands to: indigo | gold | firebrick | indianred | yellow | darkolivegreen | darkseagreen | slategrey | darkslategrey | mediumvioletred | mediumorchid | transparent | chartreuse | mediumslateblue | black | springgreen | crimson | lightsalmon | brown | turquoise | olivedrab | cyan | silver | skyblue | gray | darkturquoise | goldenrod | darkgreen | darkviolet | darkgray | lightpink | teal | darkmagenta | lightgoldenrodyellow | lavender | yellowgreen | thistle | violet | navy | dimgrey | orchid | blue | ghostwhite | honeydew | cornflowerblue | darkblue | darkkhaki | mediumpurple | cornsilk | red | bisque | slategray | darkcyan | khaki | wheat | deepskyblue | rebeccapurple | darkred | steelblue | aliceblue | lightslategrey | gainsboro | mediumturquoise | floralwhite | coral | purple | lightgrey | lightcyan | darksalmon | beige | azure | lightsteelblue | oldlace | greenyellow | royalblue | lightseagreen | mistyrose | sienna | lightcoral | orangered | navajowhite | lime | palegreen | burlywood | seashell | mediumspringgreen | fuchsia | papayawhip | blanchedalmond | peru | aquamarine | white | darkslategray | tomato | ivory | dodgerblue | currentcolor | lemonchiffon | chocolate | orange | forestgreen | darkgrey | olive | mintcream | antiquewhite | darkorange | cadetblue | moccasin | limegreen | saddlebrown | grey | darkslateblue | lightskyblue | deeppink | plum | aqua | darkgoldenrod | maroon | sandybrown | magenta | tan | rosybrown | pink | lightblue | palevioletred | mediumseagreen | slateblue | dimgray | powderblue | seagreen | snow | mediumblue | midnightblue | paleturquoise | palegoldenrod | whitesmoke | darkorchid | salmon | lightslategray | lawngreen | lightgreen | lightgray | hotpink | lightyellow | lavenderblush | linen | mediumaquamarine | green | blueviolet | peachpuff">&lt;color></span>,
with <var>size</var>’s dimensions.</p>
       <li data-md>
        <p>Set <var>item</var>’s percentage to the <var>argument</var>’s percentage.</p>
      </ol>
     <li data-md>
      <p>Let <var>percentage sum</var> be the sum of all the percentages of the <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-item" id="ref-for-list-item①">items</a> in <var>images</var>.</p>
     <li data-md>
      <p>If <var>percentage sum</var> is less than <span class="css">100%</span>,
append a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#tuple" id="ref-for-tuple③">tuple</a> to <var>images</var> consisting of a solid-color transparent-black image
with <var>size</var>’s dimensions,
and a percentage equal to <span class="css">100%</span> minus <var>percentage sum</var>.</p>
      <p>Otherwise,
if <var>percentage sum</var> is greater than <span class="css">100%</span>,
then <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate②">for each</a> <var>item</var> in <var>images</var>,
divide <var>item</var>’s percentage by <var>percentage sum</var>,
and set <var>item</var>’s percentage to the result.</p>
     <li data-md>
      <p>Let <var>final image</var> be an image
with <var>size</var>’s dimensions,
and every pixel being the weighted linear average of the corresponding pixels of <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate③">each</a> <var>item</var>’s image in <var>images</var>,
weighted according to the <var>item</var>’s percentage.
(Average both the color channels and the alpha channel of the pixels.)
For the purpose of this calculation,
each pixel’s color must be in pre-multiplied sRGB.</p>
      <details class="note">
       <summary>Details on the above operation</summary>
       <p>This is applying an N-way Porter-Duff <code>dissolve</code> operation to the source images.
	Wikipedia defines <code>dissolve</code> as a stochastic operation,
	with the result pixels independently randomly chosen from the source images’ corresponding pixels
	according to their source images’ weights,
	but as pixels shrink to infinitely small,
	this converges to doing color-averaging in pre-multiplied color space.</p>
       <p>In particular, this means that `cross-fade(white 50%, transparent 50%)`
	will produce a partially-transparent solid white image.
	(Rather than a partially-transparent gray,
	which is what you’d get if you averaged the opaque white and transparent black pixels
	in non-premultiplied space.)</p>
       <p>As converting to pre-multiplied does entail some loss of precision,
	and graphics libraries may or may not support this operation natively,
	as per usual any method can be used so long as it achieves the specified effect.</p>
       <p>For example, one can instead rebalance the percentages
	according to the alphas of each pixel,
	then do the color-channel averages in non-premultiplied space.
	E.g., to render <span class="css">cross-fade(rgb(255 0 0 / 1) 40%, rgb(0 255 0 / .5) 20%, rgb(0 0 255 / 0) 40%)</span>,
	rebalancing the percentages according to the 1 / .5 / 0 alphas
	would produce 40% / 10% / 0%
	(which renormalizes to 80% / 20% / 0%),
	at which point you can average the raw color channel values
	and end up with an <span class="css">rgb(204 51 0 / .5)</span> image.
	(Note that the alpha channel is still averaged using the original percentages,
	not the rebalanced ones.)</p>
      </details>
     <li data-md>
      <p>Return <var>final image</var>.</p>
    </ol>
   </div>
   <h4 class="heading settled" data-level="2.5.3" id="cross-fade-complex"><span class="secno">2.5.3. </span><span class="content">Simplifying Complex <a class="css" data-link-type="maybe" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade①③">cross-fade()</a></span><a class="self-link" href="#cross-fade-complex"></a></h4>
   <p class="issue" id="issue-efd818cb"><a class="self-link" href="#issue-efd818cb"></a> Per WG resolution,
	define a notion of "equality" for images,
	and combine "same" images at computed-value time,
	summing their percentages.</p>
   <p class="issue" id="issue-84499f31"><a class="self-link" href="#issue-84499f31"></a> Per WG resolution,
	simplify directly-nested <a class="css" data-link-type="maybe" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade①④">cross-fade()</a> at computed-value time
	by just distributing the percentage and flattening; <span class="css">cross-fade(A 10%, cross-fade(B 30%, C 70%) 90%)</span> becomes <span class="css">cross-fade(A 10%, B 27%, C 63%)</span>.</p>
   <h3 class="heading settled caniuse-paneled" data-level="2.6" id="element-notation"><span class="secno">2.6. </span><span class="content">Using Elements as Images: the <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element①">element()</a> notation</span><a class="self-link" href="#element-notation"></a></h3>
   <p>The <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element②">element()</a> function allows an author to use an element in the document as an image.
	As the referenced element changes appearance,
	the image changes as well.
	This can be used, for example,
	to create live previews of the next/previous slide in a slideshow,
	or to reference a canvas element for a fancy generated gradient or even an animated background.</p>
   <p class="note" role="note"><span>Note:</span> The <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element③">element()</a> function only reproduces the <em>appearance</em> of the referenced element,
	not the actual content and its structure.
	Authors should only use this for decorative purposes,
	and must not use <span class="css" id="ref-for-funcdef-element④">element()</span> to reproduce an element with significant content across the page.
	Instead, just insert multiple copies of the element into the document.</p>
   <p>The syntax for <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element⑤">element()</a> is:</p>
<pre class="prod"><dfn class="dfn-paneled" data-dfn-type="function" data-export id="funcdef-element">element()</dfn> = element( <a class="production" data-link-type="type" href="https://drafts.csswg.org/selectors-4/#typedef-id-selector" id="ref-for-typedef-id-selector">&lt;id-selector></a> )</pre>
   <p>where <a class="production css" data-link-type="type" href="https://drafts.csswg.org/selectors-4/#typedef-id-selector" id="ref-for-typedef-id-selector①">&lt;id-selector></a> is an ID selector <a data-link-type="biblio" href="#biblio-select">[SELECT]</a>.</p>
   <p class="issue" id="issue-734aa3f2"><a class="self-link" href="#issue-734aa3f2"></a> Do we need to be able to refer to elements in external documents
		(such as SVG paint servers)?
		Or is it enough to just use url() for this? </p>
   <p class="issue" id="issue-2c656975"><a class="self-link" href="#issue-2c656975"></a> This name conflicts with a somewhat similar function in GCPM.
		This needs to be resolved somehow. </p>
   <p class="issue" id="issue-e85fd299"><a class="self-link" href="#issue-e85fd299"></a> Want the ability to do "reflections" of an element,
		either as a background-image on the element or in a pseudo-element.
		This needs to be specially-handled to avoid triggering the cycle-detection. </p>
   <p class="issue" id="issue-1b39a877"><a class="self-link" href="#issue-1b39a877"></a> When we have overflow:paged,
		how can we address a single page in the view? </p>
   <p>The <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element⑥">element()</a> function references the element matched by its argument.
	The ID is first looked up in the <a data-link-type="idl" href="#dom-css-elementsources" id="ref-for-dom-css-elementsources">elementSources</a> map,
	as described in that section.
	If it’s not found,
	it’s then matched against the document.
	If multiple elements are matched,
	the function references the first such element.</p>
   <p>The image represented by the <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element⑦">element()</a> function can vary based on whether the element is visible in the document:</p>
   <dl>
    <dt> an <a data-link-type="dfn" href="#element-not-rendered" id="ref-for-element-not-rendered">element that is rendered</a>,
			is not a descendant of a replaced element,
			and generates a <a data-link-type="dfn" href="https://drafts.csswg.org/css2/visuren.html#x43" id="ref-for-x43">stacking context</a> 
    <dd>
      The function represents an image with its intrinsic size equal to the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="decorated-bounding-box">decorated bounding box</dfn> of the referenced element: 
     <ul>
      <li> for an element rendered using a CSS rendering model,
					the <a data-link-type="dfn" href="#decorated-bounding-box" id="ref-for-decorated-bounding-box">decorated bounding box</a> is the smallest axis-aligned rectangle
					that contains the <a href="https://www.w3.org/TR/2011/CR-css3-background-20110215/#border-image-area">border image areas</a> of all the fragments of the principal box 
      <li> for an element rendered using the SVG rendering model, <a href="https://www.w3.org/TR/SVGTiny12/intro.html#TermDecoratedBoundingBox">the decorated bounding box is defined by SVG</a> 
     </ul>
     <p class="note" role="note"><span>Note:</span> Because images clip anything outside their bounds by default,
			this means that decorations that extend outside the <a data-link-type="dfn" href="#decorated-bounding-box" id="ref-for-decorated-bounding-box①">decorated bounding box</a>,
			like box shadows,
			may be clipped.</p>
     <p>The image is constructed by rendering the referenced element and its descendants
			(at the same size that they would be in the document)
			over an infinite <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-color-4/#valdef-color-transparent" id="ref-for-valdef-color-transparent③">transparent</a> canvas,
			positioned so that the edges of the <a data-link-type="dfn" href="#decorated-bounding-box" id="ref-for-decorated-bounding-box②">decorated bounding box</a> are flush with the edges of the image.</p>
     <p class="issue" id="issue-ed057ccb"><a class="self-link" href="#issue-ed057ccb"></a> Requiring some degree of stacking context on the element appears to be required for an efficient implementation.
				Do we need a full stacking context, or just a pseudo-stacking context?
				Should it need to be a stacking context normally,
				or can we just render it as a stacking context when rendering it to element()? </p>
     <p>If the referenced element has a transform applied to it or an ancestor,
			the transform must be ignored when rendering the element as an image. <a data-link-type="biblio" href="#biblio-css3-transforms">[CSS3-TRANSFORMS]</a></p>
     <p>If the referenced element is broken across pages,
			the element is displayed as if the page content areas were joined flush in the pagination direction,
			with pages' edges corresponding to the initial containing block’s start edge aligned. <span class="note">Elements broken across lines or columns are just rendered with their <a data-link-type="dfn" href="#decorated-bounding-box" id="ref-for-decorated-bounding-box③">decorated bounding box</a>.</span></p>
     <p>Implementations may either re-use existing bitmap data generated for the referenced element
			or regenerate the display of the element to maximize quality at the image’s size
			(for example, if the implementation detects that the referenced element is an SVG fragment);
			in the latter case, the layout of the referenced element in the image must not be changed by the regeneration process.
			That is, the image must look identical to the referenced element,
			modulo rasterization quality.</p>
     <div class="example" id="example-bd4bbdd7">
      <a class="self-link" href="#example-bd4bbdd7"></a> 
      <p>As a somewhat silly example, a <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/grouping-content.html#the-p-element" id="ref-for-the-p-element">p</a></code> element can be reused as a background elsewhere in the document:</p>
<pre class="lang-html highlight"><c- p>&lt;</c-><c- f>style</c-><c- p>></c->
<c- p>#</c-><c- nn>src</c-> <c- p>{</c-> <c- k>color</c-><c- p>:</c-> <c- kc>white</c-><c- p>;</c-> <c- k>background</c-><c- p>:</c-> <c- kc>lime</c-><c- p>;</c-> <c- k>width</c-><c- p>:</c-> <c- mi>300</c-><c- b>px</c-><c- p>;</c-> <c- k>height</c-><c- p>:</c-> <c- mi>40</c-><c- b>px</c-><c- p>;</c-> <c- k>position</c-><c- p>:</c-> <c- kc>relative</c-><c- p>;</c-> <c- p>}</c->
<c- p>#</c-><c- nn>dst</c-> <c- p>{</c-> <c- k>color</c-><c- p>:</c-> <c- kc>black</c-><c- p>;</c-> <c- k>background</c-><c- p>:</c-> <c- nf>element</c-><c- p>(</c-><c- mh>#src</c-><c- p>);</c-> <c- k>padding</c-><c- p>:</c-> <c- mi>20</c-><c- b>px</c-><c- p>;</c-> <c- k>margin</c-><c- p>:</c-> <c- mi>20</c-><c- b>px</c-> <c- mi>0</c-><c- p>;</c-> <c- p>}</c->
<c- p>&lt;/</c-><c- f>style</c-><c- p>></c->
<c- p>&lt;</c-><c- f>p</c-> <c- e>id</c-><c- o>=</c-><c- s>'src'</c-><c- p>></c->I’m an ordinary element!<c- p>&lt;/</c-><c- f>p</c-><c- p>></c->
<c- p>&lt;</c-><c- f>p</c-> <c- e>id</c-><c- o>=</c-><c- s>'dst'</c-><c- p>></c->I’m using the previous element as my background!<c- p>&lt;/</c-><c- f>p</c-><c- p>></c->
</pre>
      <p><img alt src="images/element-function.png"></p>
     </div>
    <dt>an <a data-link-type="dfn" href="#element-not-rendered" id="ref-for-element-not-rendered①">element that is not rendered</a>, but which provides a <a data-link-type="dfn" href="#paint-source" id="ref-for-paint-source">paint source</a> 
    <dd>
      The function represents an image with the intrinsic size and appearance of the <a data-link-type="dfn" href="#paint-source" id="ref-for-paint-source①">paint source</a>.
			The host language defines the size and appearance of paint sources. 
     <div class="example" id="example-e5807cfa">
      <a class="self-link" href="#example-e5807cfa"></a> For example, the <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element⑧">element()</a> function can reference an SVG <code>&lt;pattern></code> element in an HTML document: 
<pre class="lang-html highlight"><c- cp>&lt;!DOCTYPE html></c->
<c- p>&lt;</c-><c- f>svg</c-><c- p>></c->
  <c- p>&lt;</c-><c- f>defs</c-><c- p>></c->
    <c- p>&lt;</c-><c- f>pattern</c-> <c- e>id</c-><c- o>=</c-><c- s>'pattern1'</c-><c- p>></c->
      <c- p>&lt;</c-><c- f>path</c-> <c- e>d</c-><c- o>=</c-><c- s>'...'</c-><c- p>></c->
    <c- p>&lt;/</c-><c- f>pattern</c-><c- p>></c->
  <c- p>&lt;/</c-><c- f>defs</c-><c- p>></c->
<c- p>&lt;/</c-><c- f>svg</c-><c- p>></c->
<c- p>&lt;</c-><c- f>p</c-> <c- e>style</c-><c- o>=</c-><c- s>"background: element(#pattern1)"</c-><c- p>></c->
  I’m using the pattern as a background!
  If the pattern is changed or animated,
  my background will be updated too!
<c- p>&lt;/</c-><c- f>p</c-><c- p>></c->
</pre>
      <p>HTML also defines that a handful of elements,
				such as <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/canvas.html#canvas" id="ref-for-canvas">canvas</a></code>, <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element" id="ref-for-the-img-element">img</a></code>, and <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/media.html#video" id="ref-for-video">video</a></code>,
				provide a paint source.
				This means that CSS can, for example,
				reference a canvas that’s being drawn into,
				but not displayed in the page:</p>
<pre class="lang-html highlight"><c- cp>&lt;!DOCTYPE html></c->
<c- p>&lt;</c-><c- f>script</c-><c- p>></c->
  <c- a>var</c-> canvas <c- o>=</c-> document<c- p>.</c->querySelector<c- p>(</c-><c- t>'#animated-bullet'</c-><c- p>);</c->
  canvas<c- p>.</c->width <c- o>=</c-> <c- mi>20</c-><c- p>;</c-> canvas<c- p>.</c->height <c- o>=</c-> <c- mi>20</c-><c- p>;</c->
  drawAnimation<c- p>(</c->canvas<c- p>);</c->
<c- p>&lt;/</c-><c- f>script</c-><c- p>></c->
<c- p>&lt;</c-><c- f>canvas</c-> <c- e>id</c-><c- o>=</c-><c- s>'animated-bullet'</c-> <c- e>style</c-><c- o>=</c-><c- s>'display:none'</c-><c- p>>&lt;/</c-><c- f>canvas</c-><c- p>></c->
<c- p>&lt;</c-><c- f>ul</c-> <c- e>style</c-><c- o>=</c-><c- s>"list-style-image: element(#animated-bullet);"</c-><c- p>></c->
  <c- p>&lt;</c-><c- f>li</c-><c- p>></c->I’m using the canvas as a bullet!<c- p>&lt;/</c-><c- f>li</c-><c- p>></c->
  <c- p>&lt;</c-><c- f>li</c-><c- p>></c->So am I!<c- p>&lt;/</c-><c- f>li</c-><c- p>></c->
  <c- p>&lt;</c-><c- f>li</c-><c- p>></c->As the canvas is changed over time with Javascript,
      we’ll all update our bullet image with it!<c- p>&lt;/</c-><c- f>li</c-><c- p>></c->
<c- p>&lt;/</c-><c- f>ul</c-><c- p>></c->
</pre>
     </div>
    <dt>anything else 
    <dd>
     <p>The function represents an <a data-link-type="dfn" href="#invalid-image" id="ref-for-invalid-image⑥">invalid image</a>.</p>
     <div class="example" id="example-c609cf01">
      <a class="self-link" href="#example-c609cf01"></a> 
      <p>For example, all of the following <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element⑨">element()</a> uses will result in a transparent background:</p>
<pre class="lang-html highlight"><c- cp>&lt;!DOCTYPE html></c->
<c- p>&lt;</c-><c- f>p</c-> <c- e>id</c-><c- o>=</c-><c- s>'one'</c-> <c- e>style</c-><c- o>=</c-><c- s>"display:none; position: relative;"</c-><c- p>></c->one<c- p>&lt;/</c-><c- f>p</c-><c- p>></c->
<c- p>&lt;</c-><c- f>iframe</c-> <c- e>src</c-><c- o>=</c-><c- s>"http://example.com"</c-><c- p>></c->
  <c- p>&lt;</c-><c- f>p</c-> <c- e>id</c-><c- o>=</c-><c- s>'two'</c-> <c- e>style</c-><c- o>=</c-><c- s>"position: relative;"</c-><c- p>></c->I’m fallback content!<c- p>&lt;/</c-><c- f>p</c-><c- p>></c->
<c- p>&lt;/</c-><c- f>iframe</c-><c- p>></c->
<c- p>&lt;</c-><c- f>ul</c-><c- p>></c->
  <c- p>&lt;</c-><c- f>li</c-> <c- e>style</c-><c- o>=</c-><c- s>"background: element(#one);"</c-><c- p>></c->
    A display:none element isn’t rendered, and a P element
    doesn’t provide a paint source.
  <c- p>&lt;/</c-><c- f>li</c-><c- p>></c->
  <c- p>&lt;</c-><c- f>li</c-> <c- e>style</c-><c- o>=</c-><c- s>"background: element(#two);"</c-><c- p>></c->
    The descendants of a replaced element like an IFRAME
    can’t be used in element() either.
  <c- p>&lt;/</c-><c- f>li</c-><c- p>></c->
  <c- p>&lt;</c-><c- f>li</c-> <c- e>style</c-><c- o>=</c-><c- s>"background: element(#three);"</c-><c- p>></c->
    There’s no element with an id of "three", so this also
    gets rendered as a transparent image.
  <c- p>&lt;/</c-><c- f>li</c-><c- p>></c->
<c- p>&lt;/</c-><c- f>ul</c-><c- p>></c->
</pre>
     </div>
   </dl>
   <p>An element is <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="element-not-rendered" id="element-not-rendered">not rendered</dfn> if it does not have an associated box.
	This can happen, for example,
	if the element or an ancestor is <span class="css">display:none</span>.
	Host languages may define additional ways in which an element can be considered not rendered;
	for example, in SVG,
	any descendant of a <code>&lt;defs></code> element is considered to be not rendered.</p>
   <div class="example" id="example-b505442b">
    <a class="self-link" href="#example-b505442b"></a> 
    <p>The <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element①⓪">element()</a> function can be put to many uses.
		For example, it can be used to show a preview of the previous or next slide in a slideshow:</p>
<pre class="lang-html highlight"><c- cp>&lt;!DOCTYPE html></c->
<c- p>&lt;</c-><c- f>script</c-><c- p>></c->
<c- a>function</c-> navigateSlides<c- p>()</c-> <c- p>{</c->
  <c- a>var</c-> currentSlide <c- o>=</c-> <c- p>...;</c->
  document<c- p>.</c->querySelector<c- p>(</c-><c- t>'#prev-slide'</c-><c- p>).</c->id <c- o>=</c-> <c- t>''</c-><c- p>;</c->
  document<c- p>.</c->querySelector<c- p>(</c-><c- t>'#next-slide'</c-><c- p>).</c->id <c- o>=</c-> <c- t>''</c-><c- p>;</c->
  currentSlide<c- p>.</c->previousElementSibling<c- p>.</c->id <c- o>=</c-> <c- t>'prev-slide'</c-><c- p>;</c->
  currentSlide<c- p>.</c->nextElementSibling<c- p>.</c->id <c- o>=</c-> <c- t>'next-slide'</c-><c- p>;</c->
<c- p>}</c->
<c- p>&lt;/</c-><c- f>script</c-><c- p>></c->
<c- p>&lt;</c-><c- f>style</c-><c- p>></c->
<c- p>.</c-><c- nc>slide</c-> <c- p>{</c->
  <c- c>/* Need to be a stacking context to be element()-able. */</c->
  <c- k>position</c-><c- p>:</c-> <c- kc>relative</c-><c- p>;</c->
<c- p>}</c->
<c- p>#</c-><c- nn>prev-preview</c-><c- o>,</c-> <c- p>#</c-><c- nn>next-preview</c-> <c- p>{</c->
  <c- k>position</c-><c- p>:</c-> <c- kc>fixed</c-><c- p>;</c->
  ...
<c- p>}</c->
<c- p>#</c-><c- nn>prev-preview</c-> <c- p>{</c-> <c- k>background</c-><c- p>:</c-> <c- nf>element</c-><c- p>(</c-><c- mh>#prev</c-><c- o>-</c-><c- n>slide</c-><c- p>);</c-> <c- p>}</c->
<c- p>#</c-><c- nn>next-preview</c-> <c- p>{</c-> <c- k>background</c-><c- p>:</c-> <c- nf>element</c-><c- p>(</c-><c- mh>#next</c-><c- o>-</c-><c- n>slide</c-><c- p>);</c-> <c- p>}</c->
<c- p>&lt;/</c-><c- f>style</c-><c- p>></c->
<c- p>&lt;</c-><c- f>a</c-> <c- e>id</c-><c- o>=</c-><c- s>'prev-preview'</c-><c- p>></c->Previous Slide<c- p>&lt;/</c-><c- f>a</c-><c- p>></c->
<c- p>&lt;</c-><c- f>a</c-> <c- e>id</c-><c- o>=</c-><c- s>'next-preview'</c-><c- p>></c->Next Slide<c- p>&lt;/</c-><c- f>a</c-><c- p>></c->
<c- p>&lt;</c-><c- f>section</c-> <c- e>class</c-><c- o>=</c-><c- s>'slide'</c-><c- p>></c->...<c- p>&lt;/</c-><c- f>section</c-><c- p>></c->
<c- p>&lt;</c-><c- f>section</c-> <c- e>class</c-><c- o>=</c-><c- s>'slide current-slide'</c-><c- p>></c->...<c- p>&lt;/</c-><c- f>section</c-><c- p>></c->
...
</pre>
    <p>In this example, the <code>navigateSlides</code> function updates the ids of the next and previous slides,
		which are then displayed in small floating boxes alongside the slides.
		Since you can’t interact with the slides through the <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element①①">element()</a> function (it’s just an image),
		you could even use <code>click</code> handlers on the preview boxes to help navigate through the page.</p>
   </div>
   <h4 class="heading settled" data-level="2.6.1" id="paint-sources"><span class="secno">2.6.1. </span><span class="content"> Paint Sources</span><a class="self-link" href="#paint-sources"></a></h4>
   <p>Host languages may define that some elements provide a <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="paint-source">paint source</dfn>.
	Paint sources have an intrinsic appearance and can obtain a <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#concrete-object-size" id="ref-for-concrete-object-size②">concrete object size</a> without having to do layout or rendering,
	and so may be used as images even when they’re <a data-link-type="dfn" href="#element-not-rendered" id="ref-for-element-not-rendered②">not rendered</a>.</p>
   <p>In HTML, the <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element" id="ref-for-the-img-element①">img</a></code>, <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/media.html#video" id="ref-for-video①">video</a></code>, and <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/canvas.html#canvas" id="ref-for-canvas①">canvas</a></code> elements provide paint sources.</p>
   <p>In SVG, any element that provides a <a href="https://www.w3.org/TR/SVG/pservers.html">paint server</a> provides a paint source. <span class="note">Note: In SVG1.1,
		the <code>&lt;linearGradient></code>, <code>&lt;radialGradient></code>,
		and <code>&lt;pattern></code> elements
		provide paint sources.</span> They are drawn as described in the spec,
	with the coordinate systems defined as follows:</p>
   <dl>
    <dt>objectBoundingBox 
    <dd> The coordinate system has its origin at the top left corner of the rectangle defined by the <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#concrete-object-size" id="ref-for-concrete-object-size③">concrete object size</a> that it’s being drawn into,
			and the same width and height as the <span id="ref-for-concrete-object-size④">concrete object size</span>.
			A single <a href="https://www.w3.org/TR/SVG/coords.html#Units">user coordinate</a> is the width and height of the <span id="ref-for-concrete-object-size⑤">concrete object size</span>. 
    <dt>userSpaceOnUse 
    <dd> The coordinate system has its origin at the top left corner of the rectangle defined by the <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#concrete-object-size" id="ref-for-concrete-object-size⑥">concrete object size</a> that it’s being drawn into,
			and the same width and height as the <span id="ref-for-concrete-object-size⑦">concrete object size</span>. <a href="https://www.w3.org/TR/SVG/coords.html#Units">User coordinates</a> are sized equivalently to the CSS <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-4/#px" id="ref-for-px">px</a> unit. 
   </dl>
   <p class="note" role="note"><span>Note:</span> It is expected that a future version of this module will define ways to refer to paint sources in external documents,
	or ones that are created solely by script and never inserted into a document at all.</p>
   <h4 class="heading settled" data-level="2.6.2" id="elementsources"><span class="secno">2.6.2. </span><span class="content"> Using Out-Of-Document Sources: the <code>ElementSources</code> interface</span><a class="self-link" href="#elementsources"></a></h4>
   <p>The <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element①②">element()</a> function normally selects elements within a document,
	but elements that provide a <a data-link-type="dfn" href="#paint-source" id="ref-for-paint-source②">paint source</a> don’t necessarily need to be in-document.
	For example, an HTML <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/canvas.html#canvas" id="ref-for-canvas②">canvas</a></code> element can be created, maintained, and drawn into entirely in script,
	with no need for it to be inserted into the document directly.</p>
   <p>All that’s needed is a way to refer to the element,
	as an ID selector cannot select elements outside of the document.
	The <a data-link-type="idl" href="#dom-css-elementsources" id="ref-for-dom-css-elementsources①">elementSources</a> Map object provides this.</p>
<pre class="idl highlight def"><c- b>partial</c-> <c- b>namespace</c-> <a class="idl-code" data-link-type="namespace" href="https://drafts.csswg.org/cssom-1/#namespacedef-css" id="ref-for-namespacedef-css"><c- g>CSS</c-></a> {
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <c- b>any</c-> <dfn class="dfn-paneled idl-code" data-dfn-for="CSS" data-dfn-type="attribute" data-export data-readonly data-type="any" id="dom-css-elementsources"><code><c- g>elementSources</c-></code></dfn>;
};
</pre>
   <p>Any entries in the <a data-link-type="idl" href="#dom-css-elementsources" id="ref-for-dom-css-elementsources②">elementSources</a> map with a string key
	and a value that is an object providing a <a data-link-type="dfn" href="#paint-source" id="ref-for-paint-source③">paint source</a> are made available to the <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element①③">element()</a> function.</p>
   <p>Whenever <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element①④">element()</a> uses an <a class="production css" data-link-type="type" href="https://drafts.csswg.org/selectors-4/#typedef-id-selector" id="ref-for-typedef-id-selector②">&lt;id-selector></a>,
	the ID’s value (without the leading <code>#</code> character)
	is first looked up in the <a data-link-type="idl" href="#dom-css-elementsources" id="ref-for-dom-css-elementsources③">elementSources</a> map:</p>
   <ul>
    <li> If it’s found,
			and the object associated with it provides a <a data-link-type="dfn" href="#paint-source" id="ref-for-paint-source④">paint source</a>,
			the <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element①⑤">element()</a> function represents that paint source. 
    <li> If it’s found,
			but the object associated with it <em>doesn’t</em> provide a <a data-link-type="dfn" href="#paint-source" id="ref-for-paint-source⑤">paint source</a>,
			the <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element①⑥">element()</a> function represent an <a data-link-type="dfn" href="#invalid-image" id="ref-for-invalid-image⑦">invalid image</a>. 
    <li> If the ID isn’t found in the map at all,
			it’s then looked for in the document as normal. 
   </ul>
   <p class="issue" id="issue-049385d0"><a class="self-link" href="#issue-049385d0"></a> This reuse of the ID selector matches Moz behavior.
		I’m trying to avoid slapping a <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#identifier-value" id="ref-for-identifier-value">&lt;custom-ident></a> right in the beginning of the grammar,
		as that eats too much syntax-space.
		Another possibility, though, is to start the value with a language-defined keyword <em>followed by</em> a <span class="production" id="ref-for-identifier-value①">&lt;custom-ident></span>,
		like <span class="css">element(external fancy)</span> or something.
		Naming suggestions welcome. </p>
   <div class="example" id="example-ee03d27a">
    <a class="self-link" href="#example-ee03d27a"></a> For example, fancy animating backgrounds can be done with an external canvas: 
<pre class="lang-html highlight"><c- p>&lt;</c-><c- f>script</c-><c- p>></c->
<c- a>var</c-> bg <c- o>=</c-> document<c- p>.</c->createElement<c- p>(</c-><c- t>'canvas'</c-><c- p>);</c->
bg<c- p>.</c->height <c- o>=</c-> <c- mi>200</c-><c- p>;</c->
bg<c- p>.</c->width <c- o>=</c-> <c- mi>1000</c-><c- p>;</c->
drawFancyBackground<c- p>(</c->bg<c- p>);</c->
CSS<c- p>.</c->elementSources<c- p>.</c->set<c- p>(</c-><c- t>'fancy'</c-><c- p>,</c-> bg<c- p>);</c->
<c- p>&lt;/</c-><c- f>script</c-><c- p>></c->
<c- p>&lt;</c-><c- f>style</c-><c- p>></c->
<c- f>h1</c-> <c- p>{</c->
  <c- k>background-image</c-><c- p>:</c-> <c- nf>element</c-><c- p>(</c-><c- mh>#fancy</c-><c- p>);</c->
<c- p>}</c->
<c- p>&lt;/</c-><c- f>style</c-><c- p>></c->
</pre>
    <p>As the "fancy" canvas is drawn into and animated,
		the backgrounds of all the H1 elements will automatically update in tandem.</p>
    <p>Note that the <a data-link-type="idl" href="#dom-css-elementsources" id="ref-for-dom-css-elementsources④">elementSources</a> map is consulted <em>before</em> the document
		to match the ID selector,
		so even if there’s an element in the document that would match <span class="css">#fancy</span>,
		the backgrounds will still predictably come from the <span id="ref-for-dom-css-elementsources⑤">elementSources</span> value instead.</p>
   </div>
   <h4 class="heading settled" data-level="2.6.3" id="element-cycles"><span class="secno">2.6.3. </span><span class="content"> Cycle Detection</span><a class="self-link" href="#element-cycles"></a></h4>
   <p>The <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element①⑦">element()</a> function can produce nonsensical circular relationships,
	such as an element using itself as its own background.
	These relationships can be easily and reliably detected and resolved, however,
	by keeping track of a dependency graph and using common cycle-detection algorithms.</p>
   <p>The dependency graph consists of edges such that:</p>
   <ul>
    <li> every element depends on its children 
    <li> for any element A with a property using the <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element①⑧">element()</a> function pointing to an element B,
			A depends on B 
    <li> if a host language defines a way for elements to refer to the rendering of other elements,
			the referencing element depends on the referenced element.
			For example, in SVG,
			a <code>&lt;use></code> element depends on the element it referenced. 
   </ul>
   <p>If the graph contains a cycle,
	any <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element①⑨">element()</a> functions participating in the cycle are <a data-link-type="dfn" href="#invalid-image" id="ref-for-invalid-image⑧">invalid images</a>.</p>
   <h2 class="heading settled" data-level="3" id="gradients"><span class="secno">3. </span><span class="content"> Gradients</span><a class="self-link" href="#gradients"></a></h2>
   <p>A gradient is an image that smoothly fades from one color to another.
	These are commonly used for subtle shading in background images, buttons, and many other things.
	The <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="gradient function" id="gradient-function">gradient functions</dfn> described in this section allow an author to specify such an image in a terse syntax,
	so that the UA can generate the image automatically when rendering the page.
	The syntax of a <a class="production css" data-link-type="type" href="#typedef-gradient" id="ref-for-typedef-gradient①">&lt;gradient></a> is:</p>
<pre class="prod"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-gradient">&lt;gradient></dfn> = [
  <a class="production" data-link-type="function" href="https://drafts.csswg.org/css-images-3/#funcdef-linear-gradient" id="ref-for-funcdef-linear-gradient">&lt;linear-gradient()></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑧">|</a> <a class="production" data-link-type="function" href="#funcdef-repeating-linear-gradient" id="ref-for-funcdef-repeating-linear-gradient">&lt;repeating-linear-gradient()></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑨">|</a>
  <a class="production" data-link-type="function" href="https://drafts.csswg.org/css-images-3/#funcdef-radial-gradient" id="ref-for-funcdef-radial-gradient">&lt;radial-gradient()></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⓪">|</a> <a class="production" data-link-type="function" href="#funcdef-repeating-radial-gradient" id="ref-for-funcdef-repeating-radial-gradient">&lt;repeating-radial-gradient()></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①①">|</a>
  <a class="production" data-link-type="function" href="#funcdef-conic-gradient" id="ref-for-funcdef-conic-gradient">&lt;conic-gradient()></a>  <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①②">|</a> <a class="production" data-link-type="function" href="#funcdef-repeating-conic-gradient" id="ref-for-funcdef-repeating-conic-gradient">&lt;repeating-conic-gradient()></a> ]
</pre>
   <div class="example" id="example-3bdc7fad">
    <a class="self-link" href="#example-3bdc7fad"></a> 
    <p>As with the other <a class="production css" data-link-type="type" href="#typedef-image" id="ref-for-typedef-image①⑥">&lt;image></a> types defined in this specification,
		gradients can be used in any property that accepts images.
		For example:</p>
    <ul class="lang-css">
     <li><code class="highlight">background: linear-gradient(white, gray);</code> 
     <li><code class="highlight">list-style-image: radial-gradient(circle, #006, #00a 90%, #0000af 100%, white 100%)</code> 
    </ul>
   </div>
   <p>A gradient is drawn into a box with the dimensions of the <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#concrete-object-size" id="ref-for-concrete-object-size⑧">concrete object size</a>,
	referred to as the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="gradient-box">gradient box</dfn>.
	However, the gradient itself has no <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#intrinsic-dimensions" id="ref-for-intrinsic-dimensions①">intrinsic dimensions</a>.</p>
   <div class="example" id="example-aa187bec"><a class="self-link" href="#example-aa187bec"></a> For example, if you use a gradient as a background,
		by default the gradient will draw into a <a data-link-type="dfn" href="#gradient-box" id="ref-for-gradient-box">gradient box</a> the size of the element’s padding box.
		If <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-size" id="ref-for-propdef-background-size">background-size</a> is explicitly set to a value such as <span class="css">100px 200px</span>,
		then the <span id="ref-for-gradient-box①">gradient box</span> will be 100px wide and 200px tall.
		Similarly, for a gradient used as a <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-lists-3/#propdef-list-style-image" id="ref-for-propdef-list-style-image②">list-style-image</a>,
		the box would be a 1em square,
		which is the <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#default-object-size" id="ref-for-default-object-size">default object size</a> for that property. </div>
   <p>Gradients are specified by defining the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="starting-point">starting point</dfn> and <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="ending-point">ending point</dfn> of a <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="gradient-line">gradient line</dfn> (which, depending on the type of gradient,
	may be technically a line, or a ray, or a spiral),
	and then specifying colors at points along this line.
	The colors are smoothly blended to fill in the rest of the line,
	and then each type of gradient defines how to use the color of the <a data-link-type="dfn" href="#gradient-line" id="ref-for-gradient-line">gradient line</a> to produce the actual gradient.</p>
   <h3 class="heading settled" data-level="3.1" id="linear-gradients"><span class="secno">3.1. </span><span class="content">Linear Gradients: the <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-images-3/#funcdef-linear-gradient" id="ref-for-funcdef-linear-gradient①">linear-gradient()</a> notation</span><a class="self-link" href="#linear-gradients"></a></h3>
   <p class="note" role="note"><span>Note:</span> No change from <a data-link-type="biblio" href="#biblio-css3-images">[css3-images]</a>.</p>
   <h3 class="heading settled" data-level="3.2" id="radial-gradients"><span class="secno">3.2. </span><span class="content">Radial Gradients: the <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-images-3/#funcdef-radial-gradient" id="ref-for-funcdef-radial-gradient①">radial-gradient()</a> notation</span><a class="self-link" href="#radial-gradients"></a></h3>
   <p class="note" role="note"><span>Note:</span> No change from <a data-link-type="biblio" href="#biblio-css3-images">[css3-images]</a>.</p>
   <h3 class="heading settled" data-level="3.3" id="conic-gradients"><span class="secno">3.3. </span><span class="content"> Conic Gradients: the <a class="css" data-link-type="maybe" href="#funcdef-conic-gradient" id="ref-for-funcdef-conic-gradient①">conic-gradient()</a> notation</span><a class="self-link" href="#conic-gradients"></a></h3>
   <p>A conic gradient starts by specifying the center of a circle,
	similar to radial gradients,
	except that conic gradient color-stops are placed <em>around</em> the circumference of the circle,
	rather than on a line emerging from the center,
	causing the color to smoothly transition as you spin around the center,
	rather than as you progress outward from the center.</p>
   <p>A conic gradient is specified by indicating a rotation angle, the center of the gradient,
	and then specifying a list of color-stops.
	Unlike linear and radial gradients,
	whose color-stops are placed by specifying a <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value" id="ref-for-length-value①" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a>,
	the color-stops of a conic gradient are specified with an <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#angle-value" id="ref-for-angle-value" title="Expands to: turn | rad | grad | deg">&lt;angle></a>.
	Rays are then drawn emerging from the center and pointing in all directions,
	with the color of each ray equal to the color of the gradient-line where they intersect it.</p>
   <p class="note" role="note"><span>Note:</span> These gradients are called "conic" or "conical"
	because, if the color stops are chosen to be significantly lighter on one side than the other,
	it produces a pattern that looks like a cone observed from above.
	They are also known as "angle" gradients in some contexts,
	since they are produced by varying the rotation angle of a ray.</p>
   <div class="example" id="example-0a9f6351">
    <a class="self-link" href="#example-0a9f6351"></a> 
    <div style="overflow: hidden">
      <img alt="[An image showing a box with a background shading gradually clockwise from white to black, starting from the top. A gradient circle is shown, and the colors at 0 and 216 degrees respectively.]" src="images/conic-diagram.png" style="float: right; margin-left: 1em;"> 
     <p>This example visually illustrates how <span class="css">conic-gradient(at 25% 30%, white, black 60%)</span> would be drawn. Note that since color stop positions always resolve to angles, the only effect of the <span class="css">at 25% 30%</span> is a 2D translation of the gradient, i.e. it does not affect how the gradient is drawn.</p>
    </div>
   </div>
   <h4 class="no-toc heading settled" data-level="3.3.1" id="conic-gradient-syntax"><span class="secno">3.3.1. </span><span class="content"> <a class="css" data-link-type="maybe" href="#funcdef-conic-gradient" id="ref-for-funcdef-conic-gradient②">conic-gradient()</a> Syntax</span><a class="self-link" href="#conic-gradient-syntax"></a></h4>
   <p>The syntax for a conic gradient is:</p>
<pre class="prod"><dfn class="dfn-paneled" data-dfn-type="function" data-export id="funcdef-conic-gradient">conic-gradient()</dfn> = conic-gradient(
  [ from <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#angle-value" id="ref-for-angle-value①" title="Expands to: turn | rad | grad | deg">&lt;angle></a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt④">?</a> [ at <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-position" id="ref-for-typedef-position">&lt;position></a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt⑤">?</a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-comma" id="ref-for-comb-comma①">,</a>
  <a class="production" data-link-type="type" href="#typedef-angular-color-stop-list" id="ref-for-typedef-angular-color-stop-list">&lt;angular-color-stop-list></a>
)
</pre>
   <p>The arguments are defined as follows:</p>
   <dl>
    <dt><dfn class="css" data-dfn-for="conic-gradient(), repeating-conic-gradient()" data-dfn-type="value" data-export id="valdef-conic-gradient-angle"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#angle-value" id="ref-for-angle-value②" title="Expands to: turn | rad | grad | deg">&lt;angle></a><a class="self-link" href="#valdef-conic-gradient-angle"></a></dfn> 
    <dd> The entire gradient is rotated by this angle.
			If omitted, defaults to <span class="css">0deg</span>.
			The unit identifier may be omitted if the <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#angle-value" id="ref-for-angle-value③" title="Expands to: turn | rad | grad | deg">&lt;angle></a> is zero. 
    <dt><dfn class="css" data-dfn-for="conic-gradient(), repeating-conic-gradient()" data-dfn-type="value" data-export id="valdef-conic-gradient-position"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-position" id="ref-for-typedef-position①">&lt;position></a><a class="self-link" href="#valdef-conic-gradient-position"></a></dfn> 
    <dd> Determines the <dfn class="dfn-paneled" data-dfn-for="conic-gradient(), repeating-conic-gradient()" data-dfn-type="dfn" data-export id="conic-gradient-gradient-center">gradient center</dfn> of the gradient.
			The <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-position" id="ref-for-typedef-position②">&lt;position></a> value type (which is also used for <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-position" id="ref-for-propdef-background-position">background-position</a>)
			is defined in <a data-link-type="biblio" href="#biblio-css-values-3">[css-values-3]</a>,
			and is resolved using the center-point as the object area
			and the <a data-link-type="dfn" href="#gradient-box" id="ref-for-gradient-box②">gradient box</a> as the positioning area.
			If this argument is omitted, it defaults to <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-position-center" id="ref-for-valdef-background-position-center">center</a>. 
   </dl>
   <p class="issue" id="issue-c602e287"><a class="self-link" href="#issue-c602e287"></a> Usually in conic gradients the sharp transition at 0deg is undesirable, which is typically avoided by making sure the first and last color stops are the same color. Perhaps it would be useful to have a keyword for automatically achieving this. </p>
   <p class="issue" id="issue-e52a09ba"><a class="self-link" href="#issue-e52a09ba"></a> Would a radius (inner &amp; outer) for clipping the gradient be useful? If so, we could also support lengths in color stop positions, since we now have a specific radius. </p>
   <p class="issue" id="issue-51674aed"><a class="self-link" href="#issue-51674aed"></a> Are elliptical conic gradients useful? Do graphics libraries support them? </p>
   <h4 class="no-toc heading settled" data-level="3.3.2" id="conic-color-stops"><span class="secno">3.3.2. </span><span class="content"> Placing Color Stops</span><a class="self-link" href="#conic-color-stops"></a></h4>
   <p>Color stops are placed on a <a data-link-type="dfn" href="#gradient-line" id="ref-for-gradient-line①">gradient line</a> that curves around the <a data-link-type="dfn" href="#conic-gradient-gradient-center" id="ref-for-conic-gradient-gradient-center">gradient center</a> in a circle,
	with both the 0% and 100% locations at 0deg.
	Just like linear gradients,
	0deg points to the top of the page,
	and increasing angles correspond to clockwise movement around the circle.</p>
   <p class="note" role="note"><span>Note:</span> It may be more helpful to think of the gradient line as forming a spiral,
	where only the segment from 0deg to 360deg is rendered.
	This avoids any confusion about "overlap" when you have angles outside of the rendered region.</p>
   <p>A color-stop can be placed at a location before 0% or after 100%;
	though these regions are never directly consulted for rendering,
	color stops placed there can affect the color of color-stops within the rendered region
	through interpolation or repetition (see <a href="#repeating-gradients">repeating gradients</a>).
	For example, <span class="css">conic-gradient(red -50%, yellow 150%)</span> produces a conic gradient
	that starts with a reddish-orange color at 0deg (specifically, #f50),
	and transitions to an orangish-yellow color at 360deg (specifically, #fa0).</p>
   <p>The color of the gradient at any point is determined by first finding the unique ray
	anchored at the center of the gradient that passes through the given point.
	The point’s color is then the color of the <a data-link-type="dfn" href="#gradient-line" id="ref-for-gradient-line②">gradient line</a> at the location where this ray intersects it.</p>
   <h4 class="no-toc heading settled" data-level="3.3.3" id="conic-gradient-examples"><span class="secno">3.3.3. </span><span class="content"> Conic Gradient Examples</span><a class="self-link" href="#conic-gradient-examples"></a></h4>
   <p>All of the following <a class="css" data-link-type="maybe" href="#funcdef-conic-gradient" id="ref-for-funcdef-conic-gradient③">conic-gradient()</a> examples are presumed to be applied to a box that is 300px wide and 200px tall, unless otherwise specified.</p>
   <div class="example" id="example-27baf37f">
    <a class="self-link" href="#example-27baf37f"></a> Below are various ways of specifying the same basic conic gradient: 
<pre class="lang-css highlight">background: conic-gradient(#f06, gold);
background: conic-gradient(at 50% 50%, #f06, gold);
background: conic-gradient(from 0deg, #f06, gold);
background: conic-gradient(from 0deg at center, #f06, gold);
background: conic-gradient(#f06 0%, gold 100%);
background: conic-gradient(#f06 0deg, gold 1turn);
</pre>
    <p><img alt src="images/conic1.png"></p>
   </div>
   <div class="example" id="example-5088fa5e">
    <a class="self-link" href="#example-5088fa5e"></a> Below are various ways of specifying the same basic conic gradient.
		This demonstrates how even though color stops with angles outside [0deg, 360deg) are not directly painted,
		they can still affect the color of the painted part of the gradient. 
<pre class="lang-css highlight">background: conic-gradient(white -50%, black 150%);
background: conic-gradient(white -180deg, black 540deg);
background: conic-gradient(hsl(0,0%,75%), hsl(0,0%,25%));
</pre>
    <p><img alt src="images/conic2.png"></p>
   </div>
   <div class="example" id="example-34ff21bd">
    <a class="self-link" href="#example-34ff21bd"></a> Below are two different ways of specifying the same rotated conic gradient, one with a rotation angle and one without: 
<pre class="lang-css highlight">background: conic-gradient(from 45deg, white, black, white);
background: conic-gradient(hsl(0,0%,75%), white 45deg, black 225deg, hsl(0,0%,75%));
</pre>
    <p><img alt src="images/conic3.png"></p>
    <p>Note that offsetting every color stop by the rotation angle instead would not work and produces an entirely different gradient:</p>
<pre>background: conic-gradient(white 45deg, black 225deg, white 405deg);
</pre>
    <p><img alt src="images/conic4.png"></p>
   </div>
   <div class="example" id="example-9b0946eb">
    <a class="self-link" href="#example-9b0946eb"></a> A conic gradient with a radial gradient overlaid on it, to draw a hue &amp; saturation wheel: 
<pre class="lang-css highlight">background: radial-gradient(gray, transparent),
            conic-gradient(red, magenta, blue, aqua, lime, yellow, red);
border-radius: 50%;
width: 200px; height: 200px;
</pre>
    <p><img alt src="images/conic5.png"></p>
   </div>
   <div class="example" id="example-7e5c09d0">
    <a class="self-link" href="#example-7e5c09d0"></a> A conic gradient used to draw a simple pie chart.
		The <span class="css">0deg</span> color stop positions will be fixed up to be equal to the position of the color stop before them.
		This will produce infinitesimal (invisible) transitions between the color stops with different colors,
		effectively producing solid color segments. 
<pre class="lang-css highlight">background: conic-gradient(yellowgreen 40%, gold 0deg 75%, #f06 0deg);
border-radius: 50%;
width: 200px; height: 200px;
</pre>
    <p><img alt src="images/conic6.png"></p>
   </div>
   <h3 class="heading settled" data-level="3.4" id="repeating-gradients"><span class="secno">3.4. </span><span class="content"> Repeating Gradients: the <a class="css" data-link-type="maybe" href="#funcdef-repeating-linear-gradient" id="ref-for-funcdef-repeating-linear-gradient①">repeating-linear-gradient()</a>, <a class="css" data-link-type="maybe" href="#funcdef-repeating-radial-gradient" id="ref-for-funcdef-repeating-radial-gradient①">repeating-radial-gradient()</a>, and <a class="css" data-link-type="maybe" href="#funcdef-repeating-conic-gradient" id="ref-for-funcdef-repeating-conic-gradient①">repeating-conic-gradient()</a> notations</span><a class="self-link" href="#repeating-gradients"></a></h3>
   <p>In addition to <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-images-3/#funcdef-linear-gradient" id="ref-for-funcdef-linear-gradient②">linear-gradient()</a>, <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-images-3/#funcdef-radial-gradient" id="ref-for-funcdef-radial-gradient②">radial-gradient()</a>, and <a class="css" data-link-type="maybe" href="#funcdef-conic-gradient" id="ref-for-funcdef-conic-gradient④">conic-gradient()</a>,
	this specification defines <dfn class="dfn-paneled css" data-dfn-type="function" data-export id="funcdef-repeating-linear-gradient">repeating-linear-gradient()</dfn>, <dfn class="dfn-paneled css" data-dfn-type="function" data-export id="funcdef-repeating-radial-gradient">repeating-radial-gradient()</dfn>,
	and <dfn class="dfn-paneled css" data-dfn-type="function" data-export id="funcdef-repeating-conic-gradient">repeating-conic-gradient()</dfn> values.
	These notations take the same values
	and are interpreted the same
	as their respective non-repeating siblings defined previously.</p>
   <div class="example" id="example-f09bb705">
    <a class="self-link" href="#example-f09bb705"></a> Basic repeating conic gradient: 
<pre>background: repeating-conic-gradient(gold, #f06 20deg);</pre>
    <p><img alt src="images/repeating-conic1.png"></p>
   </div>
   <div class="example" id="example-d3c61f47">
    <a class="self-link" href="#example-d3c61f47"></a> Repeating color stops with abrupt transitions creates a starburst-type background: 
<pre class="lang-css highlight">background: repeating-conic-gradient(
                hsla(0,0%,100%,.2) 0deg 15deg,
                hsla(0,0%,100%,0) 0deg 30deg
            ) #0ac;
</pre>
    <p><img alt src="images/repeating-conic2.png"></p>
   </div>
   <div class="example" id="example-2de97f53">
    <a class="self-link" href="#example-2de97f53"></a> Here repeating color stops with abrupt transitions are used to create a checkerboard: 
<pre class="lang-css highlight">background: repeating-conic-gradient(black 0deg 25%, white 0deg 50%);
background-size: 60px 60px;
</pre>
    <p><img alt src="images/repeating-conic3.png"></p>
    <p>The same checkerboard can be created via non-repeating conic gradients:</p>
<pre class="lang-css highlight">background: conic-gradient(black 25%, white 0deg 50%, black 0deg 75%, white 0deg);
background-size: 60px 60px;
</pre>
   </div>
   <h3 class="heading settled" data-level="3.5" id="gradient-colors"><span class="secno">3.5. </span><span class="content">Defining Gradient Color</span><a class="self-link" href="#gradient-colors"></a></h3>
   <p>The colors in gradients are specified using <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="color stop" id="color-stop">color stops</dfn> (a <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-color-3/#valuea-def-color" id="ref-for-valuea-def-color①⓪" title="Expands to: indigo | gold | firebrick | indianred | yellow | darkolivegreen | darkseagreen | slategrey | darkslategrey | mediumvioletred | mediumorchid | transparent | chartreuse | mediumslateblue | black | springgreen | crimson | lightsalmon | brown | turquoise | olivedrab | cyan | silver | skyblue | gray | darkturquoise | goldenrod | darkgreen | darkviolet | darkgray | lightpink | teal | darkmagenta | lightgoldenrodyellow | lavender | yellowgreen | thistle | violet | navy | dimgrey | orchid | blue | ghostwhite | honeydew | cornflowerblue | darkblue | darkkhaki | mediumpurple | cornsilk | red | bisque | slategray | darkcyan | khaki | wheat | deepskyblue | rebeccapurple | darkred | steelblue | aliceblue | lightslategrey | gainsboro | mediumturquoise | floralwhite | coral | purple | lightgrey | lightcyan | darksalmon | beige | azure | lightsteelblue | oldlace | greenyellow | royalblue | lightseagreen | mistyrose | sienna | lightcoral | orangered | navajowhite | lime | palegreen | burlywood | seashell | mediumspringgreen | fuchsia | papayawhip | blanchedalmond | peru | aquamarine | white | darkslategray | tomato | ivory | dodgerblue | currentcolor | lemonchiffon | chocolate | orange | forestgreen | darkgrey | olive | mintcream | antiquewhite | darkorange | cadetblue | moccasin | limegreen | saddlebrown | grey | darkslateblue | lightskyblue | deeppink | plum | aqua | darkgoldenrod | maroon | sandybrown | magenta | tan | rosybrown | pink | lightblue | palevioletred | mediumseagreen | slateblue | dimgray | powderblue | seagreen | snow | mediumblue | midnightblue | paleturquoise | palegoldenrod | whitesmoke | darkorchid | salmon | lightslategray | lawngreen | lightgreen | lightgray | hotpink | lightyellow | lavenderblush | linen | mediumaquamarine | green | blueviolet | peachpuff">&lt;color></a> and a corresponding position on the <a data-link-type="dfn" href="#gradient-line" id="ref-for-gradient-line③">gradient line</a>)
	and <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-local-lt="transition hint" data-lt="color transition hint" id="color-transition-hint">color transition hints</dfn> (a position between two <a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop">color stops</a> representing the halfway point in the color transition)
	which are placed on the <span id="ref-for-gradient-line④">gradient line</span>,
	defining the color at every point of the line.
	(Each <a data-link-type="dfn" href="#gradient-function" id="ref-for-gradient-function">gradient function</a> defines the shape and length of the <span id="ref-for-gradient-line⑤">gradient line</span>,
	along with its <a data-link-type="dfn" href="#starting-point" id="ref-for-starting-point">starting point</a> and <a data-link-type="dfn" href="#ending-point" id="ref-for-ending-point">ending point</a>;
	see above.)</p>
   <h4 class="heading settled" data-level="3.5.1" id="color-stop-syntax"><span class="secno">3.5.1. </span><span class="content"> Color Stop Lists</span><a class="self-link" href="#color-stop-syntax"></a></h4>
   <p><a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop①">Color stops</a> and <a data-link-type="dfn" href="#color-transition-hint" id="ref-for-color-transition-hint">transition hints</a> are specified
	in a <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="color-stop-list">color stop list</dfn>,
	which is a list of two or more <span id="ref-for-color-stop②">color stops</span> interleaved with optional <span id="ref-for-color-transition-hint①">transition hints</span>:</p>
<pre class="prod"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-color-stop-list">&lt;color-stop-list></dfn> =
  <a class="production" data-link-type="type" href="#typedef-linear-color-stop" id="ref-for-typedef-linear-color-stop">&lt;linear-color-stop></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-comma" id="ref-for-comb-comma②">,</a> [ <a class="production" data-link-type="type" href="#typedef-linear-color-hint" id="ref-for-typedef-linear-color-hint">&lt;linear-color-hint></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt⑥">?</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-comma" id="ref-for-comb-comma③">,</a> <a class="production" data-link-type="type" href="#typedef-linear-color-stop" id="ref-for-typedef-linear-color-stop①">&lt;linear-color-stop></a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma②">#</a>
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-linear-color-stop">&lt;linear-color-stop></dfn> = <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-color-3/#valuea-def-color" id="ref-for-valuea-def-color①①" title="Expands to: indigo | gold | firebrick | indianred | yellow | darkolivegreen | darkseagreen | slategrey | darkslategrey | mediumvioletred | mediumorchid | transparent | chartreuse | mediumslateblue | black | springgreen | crimson | lightsalmon | brown | turquoise | olivedrab | cyan | silver | skyblue | gray | darkturquoise | goldenrod | darkgreen | darkviolet | darkgray | lightpink | teal | darkmagenta | lightgoldenrodyellow | lavender | yellowgreen | thistle | violet | navy | dimgrey | orchid | blue | ghostwhite | honeydew | cornflowerblue | darkblue | darkkhaki | mediumpurple | cornsilk | red | bisque | slategray | darkcyan | khaki | wheat | deepskyblue | rebeccapurple | darkred | steelblue | aliceblue | lightslategrey | gainsboro | mediumturquoise | floralwhite | coral | purple | lightgrey | lightcyan | darksalmon | beige | azure | lightsteelblue | oldlace | greenyellow | royalblue | lightseagreen | mistyrose | sienna | lightcoral | orangered | navajowhite | lime | palegreen | burlywood | seashell | mediumspringgreen | fuchsia | papayawhip | blanchedalmond | peru | aquamarine | white | darkslategray | tomato | ivory | dodgerblue | currentcolor | lemonchiffon | chocolate | orange | forestgreen | darkgrey | olive | mintcream | antiquewhite | darkorange | cadetblue | moccasin | limegreen | saddlebrown | grey | darkslateblue | lightskyblue | deeppink | plum | aqua | darkgoldenrod | maroon | sandybrown | magenta | tan | rosybrown | pink | lightblue | palevioletred | mediumseagreen | slateblue | dimgray | powderblue | seagreen | snow | mediumblue | midnightblue | paleturquoise | palegoldenrod | whitesmoke | darkorchid | salmon | lightslategray | lawngreen | lightgreen | lightgray | hotpink | lightyellow | lavenderblush | linen | mediumaquamarine | green | blueviolet | peachpuff">&lt;color></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-all" id="ref-for-comb-all①">&amp;&amp;</a> <a class="production" data-link-type="type" href="#typedef-color-stop-length" id="ref-for-typedef-color-stop-length">&lt;color-stop-length></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt⑦">?</a>
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-linear-color-hint">&lt;linear-color-hint></dfn> = <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage">&lt;length-percentage></a>
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-color-stop-length">&lt;color-stop-length></dfn> = <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage①">&lt;length-percentage></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-num-range" id="ref-for-mult-num-range">{1,2}</a>

<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-angular-color-stop-list">&lt;angular-color-stop-list></dfn> =
  <a class="production" data-link-type="type" href="#typedef-angular-color-stop" id="ref-for-typedef-angular-color-stop">&lt;angular-color-stop></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-comma" id="ref-for-comb-comma④">,</a> [ <a class="production" data-link-type="type" href="#typedef-angular-color-hint" id="ref-for-typedef-angular-color-hint">&lt;angular-color-hint></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt⑧">?</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-comma" id="ref-for-comb-comma⑤">,</a> <a class="production" data-link-type="type" href="#typedef-angular-color-stop" id="ref-for-typedef-angular-color-stop①">&lt;angular-color-stop></a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma③">#</a>
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-angular-color-stop">&lt;angular-color-stop></dfn> = <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-color-3/#valuea-def-color" id="ref-for-valuea-def-color①②" title="Expands to: indigo | gold | firebrick | indianred | yellow | darkolivegreen | darkseagreen | slategrey | darkslategrey | mediumvioletred | mediumorchid | transparent | chartreuse | mediumslateblue | black | springgreen | crimson | lightsalmon | brown | turquoise | olivedrab | cyan | silver | skyblue | gray | darkturquoise | goldenrod | darkgreen | darkviolet | darkgray | lightpink | teal | darkmagenta | lightgoldenrodyellow | lavender | yellowgreen | thistle | violet | navy | dimgrey | orchid | blue | ghostwhite | honeydew | cornflowerblue | darkblue | darkkhaki | mediumpurple | cornsilk | red | bisque | slategray | darkcyan | khaki | wheat | deepskyblue | rebeccapurple | darkred | steelblue | aliceblue | lightslategrey | gainsboro | mediumturquoise | floralwhite | coral | purple | lightgrey | lightcyan | darksalmon | beige | azure | lightsteelblue | oldlace | greenyellow | royalblue | lightseagreen | mistyrose | sienna | lightcoral | orangered | navajowhite | lime | palegreen | burlywood | seashell | mediumspringgreen | fuchsia | papayawhip | blanchedalmond | peru | aquamarine | white | darkslategray | tomato | ivory | dodgerblue | currentcolor | lemonchiffon | chocolate | orange | forestgreen | darkgrey | olive | mintcream | antiquewhite | darkorange | cadetblue | moccasin | limegreen | saddlebrown | grey | darkslateblue | lightskyblue | deeppink | plum | aqua | darkgoldenrod | maroon | sandybrown | magenta | tan | rosybrown | pink | lightblue | palevioletred | mediumseagreen | slateblue | dimgray | powderblue | seagreen | snow | mediumblue | midnightblue | paleturquoise | palegoldenrod | whitesmoke | darkorchid | salmon | lightslategray | lawngreen | lightgreen | lightgray | hotpink | lightyellow | lavenderblush | linen | mediumaquamarine | green | blueviolet | peachpuff">&lt;color></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-all" id="ref-for-comb-all②">&amp;&amp;</a> <a class="production" data-link-type="type" href="#typedef-color-stop-angle" id="ref-for-typedef-color-stop-angle">&lt;color-stop-angle></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt⑨">?</a>
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-angular-color-hint">&lt;angular-color-hint></dfn> = <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-angle-percentage" id="ref-for-typedef-angle-percentage">&lt;angle-percentage></a>
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-color-stop-angle">&lt;color-stop-angle></dfn> = <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-angle-percentage" id="ref-for-typedef-angle-percentage①">&lt;angle-percentage></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-num-range" id="ref-for-mult-num-range①">{1,2}</a>

<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-color-stop">&lt;color-stop></dfn> = <a class="production" data-link-type="type" href="#typedef-color-stop-length" id="ref-for-typedef-color-stop-length①">&lt;color-stop-length></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①③">|</a> <a class="production" data-link-type="type" href="#typedef-color-stop-angle" id="ref-for-typedef-color-stop-angle①">&lt;color-stop-angle></a>
</pre>
   <div class="note" role="note">
     Note that <a class="production css" data-link-type="type" href="#typedef-color-stop-list" id="ref-for-typedef-color-stop-list">&lt;color-stop-list></a> and <a class="production css" data-link-type="type" href="#typedef-angular-color-stop-list" id="ref-for-typedef-angular-color-stop-list①">&lt;angular-color-stop-list></a> are exactly identical in structure,
		they just differ on whether they accept <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value" id="ref-for-length-value②" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a>s or <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#angle-value" id="ref-for-angle-value④" title="Expands to: turn | rad | grad | deg">&lt;angle></a>s
		for specifying the position of the stops and hints. 
    <p>Visualized with a railroad diagram,
		both of them follow this pattern:</p>
    <div class="railroad">
     <svg class="railroad-diagram" height="112" viewBox="0 0 634 112" width="634">
      <g transform="translate(.5 .5)">
       <path d="M 20 21 v 20 m 10 -20 v 20 m -10 -10 h 20.5"></path>
       <path d="M40 31h10"></path>
       <g class="non-terminal">
        <path d="M50 31h0"></path>
        <path d="M166 31h0"></path>
        <rect height="22" width="116" x="50" y="20"></rect>
        <text x="108" y="35">&lt;color-stop></text>
       </g>
       <path d="M166 31h10"></path>
       <path d="M176 31h10"></path>
       <g class="terminal">
        <path d="M186 31h0"></path>
        <path d="M214 31h0"></path>
        <rect height="22" rx="10" ry="10" width="28" x="186" y="20"></rect>
        <text x="200" y="35">,</text>
       </g>
       <path d="M214 31h10"></path>
       <path d="M224 31h10"></path>
       <g>
        <path d="M234 31h0"></path>
        <path d="M584 31h0"></path>
        <path d="M234 31h10"></path>
        <g>
         <path d="M244 31h0"></path>
         <path d="M574 31h0"></path>
         <g>
          <path d="M244 31h0"></path>
          <path d="M448 31h0"></path>
          <path d="M244 31h20"></path>
          <g>
           <path d="M264 31h164"></path>
          </g>
          <path d="M428 31h20"></path>
          <path d="M244 31a10 10 0 0 1 10 10v0a10 10 0 0 0 10 10"></path>
          <g>
           <path d="M264 51h0"></path>
           <path d="M428 51h0"></path>
           <g class="non-terminal">
            <path d="M264 51h0"></path>
            <path d="M380 51h0"></path>
            <rect height="22" width="116" x="264" y="40"></rect>
            <text x="322" y="55">&lt;color-hint></text>
           </g>
           <path d="M380 51h10"></path>
           <path d="M390 51h10"></path>
           <g class="terminal">
            <path d="M400 51h0"></path>
            <path d="M428 51h0"></path>
            <rect height="22" rx="10" ry="10" width="28" x="400" y="40"></rect>
            <text x="414" y="55">,</text>
           </g>
          </g>
          <path d="M428 51a10 10 0 0 0 10 -10v0a10 10 0 0 1 10 -10"></path>
         </g>
         <path d="M448 31h10"></path>
         <g class="non-terminal">
          <path d="M458 31h0"></path>
          <path d="M574 31h0"></path>
          <rect height="22" width="116" x="458" y="20"></rect>
          <text x="516" y="35">&lt;color-stop></text>
         </g>
        </g>
        <path d="M574 31h10"></path>
        <path d="M244 31a10 10 0 0 0 -10 10v30a10 10 0 0 0 10 10"></path>
        <g class="terminal">
         <path d="M244 81h151"></path>
         <path d="M423 81h151"></path>
         <rect height="22" rx="10" ry="10" width="28" x="395" y="70"></rect>
         <text x="409" y="85">,</text>
        </g>
        <path d="M574 81a10 10 0 0 0 10 -10v-30a10 10 0 0 0 -10 -10"></path>
       </g>
       <path d="M584 31h10"></path>
       <path d="M 594 31 h 20 m -10 -10 v 20 m 10 -20 v 20"></path>
      </g>
     </svg>
    </div>
   </div>
   <p>A <a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop③">color stop</a> with two positions is equivalent
	to specifying two <span id="ref-for-color-stop④">color stops</span> with the same color,
	one for each position. <span class="note">Specifying two locations makes it easier to create solid-color "stripes" in a gradient,
		without having to repeat the color twice.</span></p>
   <p>Percentages are resolved against the length of the <a data-link-type="dfn" href="#gradient-line" id="ref-for-gradient-line⑥">gradient line</a> between the <a data-link-type="dfn" href="#starting-point" id="ref-for-starting-point①">starting point</a> and <a data-link-type="dfn" href="#ending-point" id="ref-for-ending-point①">ending point</a>,
	with 0% being at the starting point
	and 100% being at the ending point.
	Lengths are measured along the <span id="ref-for-gradient-line⑦">gradient line</span> from the <span id="ref-for-starting-point②">starting point</span> in the direction of the <span id="ref-for-ending-point②">ending point</span>.</p>
   <p><a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop⑤">Color stop</a> and <a data-link-type="dfn" href="#color-transition-hint" id="ref-for-color-transition-hint②">transition hint</a> positions
	are usually placed between
	the <a data-link-type="dfn" href="#starting-point" id="ref-for-starting-point③">starting point</a> and <a data-link-type="dfn" href="#ending-point" id="ref-for-ending-point③">ending point</a>,
	but that’s not required:
	the gradient line extends infinitely in both directions,
	and positions can be specified anywhere
	on the <a data-link-type="dfn" href="#gradient-line" id="ref-for-gradient-line⑧">gradient line</a>.</p>
   <p>When the position of a <a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop⑥">color stop</a> is omitted,
	it is automatically assigned a position.
	The first or last <span id="ref-for-color-stop⑦">color stop</span> in the <a data-link-type="dfn" href="#color-stop-list" id="ref-for-color-stop-list">color stop list</a> is assigned
	the <a data-link-type="dfn" href="#gradient-line" id="ref-for-gradient-line⑨">gradient line’s</a> <a data-link-type="dfn" href="#starting-point" id="ref-for-starting-point④">starting point</a> or <a data-link-type="dfn" href="#ending-point" id="ref-for-ending-point④">ending point</a> (respectively).
	Otherwise,
	it’s assigned the position halfway between the two surrounding stops.
	If multiple stops in a row lack a position,
	they space themselves out equally
	between the surrounding positioned stops.
	See <a href="#color-stop-fixup">§ 3.5.3 Color Stop “Fixup”</a> for details.</p>
   <h4 class="heading settled" data-level="3.5.2" id="coloring-gradient-line"><span class="secno">3.5.2. </span><span class="content"> Coloring the Gradient Line</span><a class="self-link" href="#coloring-gradient-line"></a></h4>
   <p>At each <a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop⑧">color stop</a> position,
	the <a data-link-type="dfn" href="#gradient-line" id="ref-for-gradient-line①⓪">gradient line</a> is the color of the <span id="ref-for-color-stop⑨">color stop</span>.
	Before the first <span id="ref-for-color-stop①⓪">color stop</span>,
	the <span id="ref-for-gradient-line①①">gradient line</span> is the color of the first <span id="ref-for-color-stop①①">color stop</span>,
	and after the last <span id="ref-for-color-stop①②">color stop</span>,
	the <span id="ref-for-gradient-line①②">gradient line</span> is the color of the last <span id="ref-for-color-stop①③">color stop</span>.
	Between two <span id="ref-for-color-stop①④">color stops</span>,
	the <span id="ref-for-gradient-line①③">gradient line’s</span> color is interpolated between the colors of the two <span id="ref-for-color-stop①⑤">color stops</span>,
	with the interpolation taking place in <a href="#premultiplied">premultiplied RGBA space</a>.</p>
   <p>By default,
	this interpolation is linear—<wbr>at 25%, 50%, or 75% of the distance between two <a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop①⑥">color stops</a>,
	the color is a 25%, 50%, or 75% blend of the colors of the two stops.</p>
   <p>However, if a <a data-link-type="dfn" href="#color-transition-hint" id="ref-for-color-transition-hint③">transition hint</a> was provided between two <a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop①⑦">color stops</a>,
	the interpolation is non-linear,
	and controlled by the hint:</p>
   <div class="algorithm" data-algorithm="interpolate with a color hint">
    <ol>
     <li> Determine the location of the <a data-link-type="dfn" href="#color-transition-hint" id="ref-for-color-transition-hint④">transition hint</a> as a percentage of the distance between the two <a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop①⑧">color stops</a>,
				denoted as a number between 0 and 1,
				where 0 indicates the hint is placed right on the first <span id="ref-for-color-stop①⑨">color stop</span>,
				and 1 indicates the hint is placed right on the second <span id="ref-for-color-stop②⓪">color stop</span>.
				Let this percentage be <var>H</var>. 
     <li> For any given point between the two color stops,
				determine the point’s location as a percentage of the distance between the two <a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop②①">color stops</a>,
				in the same way as the previous step.
				Let this percentage be <var>P</var>. 
     <li> Let <var>C</var>, the color weighting at that point,
				be equal to <code><var>P</var><sup>log<sub><var>H</var></sub>(.5)</sup></code>. 
     <li> The color at that point is then a linear blend between the colors of the two <a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop②②">color stops</a>,
				blending <code>(1 - <var>C</var>)</code> of the first stop and <var>C</var> of the second stop. 
    </ol>
   </div>
   <p class="note" role="note"><span>Note:</span> The <a data-link-type="dfn" href="#color-transition-hint" id="ref-for-color-transition-hint⑤">transition hint</a> specifies where the “halfway color”—<wbr>the 50% blend between the colors of the two surrounding color stops—<wbr>should be placed.
	When the hint is exactly halfway between the two surrounding color stops,
	the above interpolation algorithm
	happens to produce the ordinary linear interpolation.
	If the hint is placed anywhere else,
	it produces a smooth exponential curve
	between the surrounding color stops,
	with the “halfway color” occurring exactly where the hint specifies.</p>
   <p class="issue" id="issue-7a141efc"><a class="self-link" href="#issue-7a141efc"></a> Add a visual example of a color hint being used.</p>
   <p>If multiple <a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop②③">color stops</a> have the same position,
	they produce an infinitesimal transition from the one specified first in the list
	to the one specified last.
	In effect, the color suddenly changes at that position rather than smoothly transitioning.</p>
   <details class="note" id="premultiplied">
    <summary>What does “pre-multiplied” mean?</summary>
     <a class="self-link" href="#premultiplied"></a>
    <p>A “pre-multiplied” color
		is written in a form
		where the alpha channel
		is multiplied into the color channels,
		rather than being processed independently.
		For example, a partially-transparent blue may be given as <code class="lang-css highlight"><span style=";white-space:nowrap">rgba(0, 0, 255, .5)</span></code>,
		which would then be expressed as <code><span style=";white-space:nowrap">[0, 0, 127.5, .5]</span></code> in its premultiplied representation.</p>
    <p>Interpolating colors using the premultiplied representations
		rather than the plain rgba representations
		tends to produce more attractive transitions,
		particularly when transitioning from a fully opaque color to fully transparent.</p>
    <p>Note that transitions where either the transparency or the color are held constant
		(for example, transitioning between <code class="lang-css highlight"><span style=";white-space:nowrap">rgba(255, 0, 0, 100%)</span></code> (opaque red)
		and <code class="lang-css highlight"><span style=";white-space:nowrap">rgba(0,0,255,100%)</span></code> (opaque blue),
		or <code class="lang-css highlight"><span style=";white-space:nowrap">rgba(255,0,0,100%)</span></code> (opaque red)
		and <code class="lang-css highlight"><span style=";white-space:nowrap">rgba(255,0,0,0%)</span></code> (transparent red))
		have identical results whether the color interpolation is done in premultiplied or non-premultiplied color-space.
		Differences only arise when <em>both</em> the color and transparency differ between the two endpoints.</p>
    <div class="example" id="example-77596609">
     <a class="self-link" href="#example-77596609"></a> The following example illustrates the difference between
			a gradient transitioning in pre-multiplied sRGBA
			and one transitioning (incorrectly) in non-premultiplied.
			In both of these example,
			the gradient is drawn over a white background.
			Both gradients could be written with the following value: 
<pre>linear-gradient(90deg, red, transparent, blue)</pre>
     <p>With premultiplied colors,
			transitions to or from "transparent" always look nice:</p>
     <object data="images/gradient2.svg" height="100" width="200">(Image requires SVG)</object>
     <p>On the other hand,
			if a gradient were to incorrectly transition in non-premultiplied space,
			the center of the gradient would be a noticeably grayish color,
			because "transparent" is actually a shorthand for <span class="css">rgba(0,0,0,0)</span>, or transparent black,
			meaning that the red transitions to a black
			as it loses opacity,
			and similarly with the blue’s transition:</p>
     <object data="images/gradient3.svg" height="100" width="200">(Image requires SVG)</object>
    </div>
   </details>
   <h4 class="heading settled" data-level="3.5.3" id="color-stop-fixup"><span class="secno">3.5.3. </span><span class="content"> Color Stop “Fixup”</span><a class="self-link" href="#color-stop-fixup"></a></h4>
   <p>When resolving the <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-4/#used-value" id="ref-for-used-value">used</a> positions of each <a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop②④">color stop</a>,
	the following steps must be applied <em>in order</em>:</p>
   <ol>
    <li> If the first <a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop②⑤">color stop</a> does not have a position,
			set its position to 0%.
			If the last <span id="ref-for-color-stop②⑥">color stop</span> does not have a position,
			set its position to 100%. 
    <li> If a <a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop②⑦">color stop</a> or <a data-link-type="dfn" href="#color-transition-hint" id="ref-for-color-transition-hint⑥">transition hint</a> has a position
			that is less than the specified position
			of any <span id="ref-for-color-stop②⑧">color stop</span> or <span id="ref-for-color-transition-hint⑦">transition hint</span> before it in the list,
			set its position to be equal to the largest specified position
			of any <span id="ref-for-color-stop②⑨">color stop</span> or <span id="ref-for-color-transition-hint⑧">transition hint</span> before it. 
    <li> If any <a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop③⓪">color stop</a> still does not have a position,
			then, for each run of adjacent <span id="ref-for-color-stop③①">color stops</span> without positions,
			set their positions so that they are evenly spaced
			between the preceding and following <span id="ref-for-color-stop③②">color stops</span> with positions. 
   </ol>
   <p>After applying these rules,
	all <a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop③③">color stops</a> and <a data-link-type="dfn" href="#color-transition-hint" id="ref-for-color-transition-hint⑨">transition hints</a> will have a definite position and color
	and they will be in ascending order.</p>
   <p class="note" role="note"><span>Note:</span> It is recommended that authors exercise caution
	when mixing different types of units,
	such as px, em, or %,
	as this can cause a <a data-link-type="dfn" href="#color-stop" id="ref-for-color-stop③④">color stop</a> to unintentionally try to move before an earlier one.
	For example,
	the rule <a class="css" data-link-type="propdesc" href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-image" id="ref-for-propdef-background-image①">background-image: linear-gradient(yellow 100px, blue 50%)</a> wouldn’t trigger any fix-up while the background area is at least <span class="css">200px</span> tall.
	If it was <span class="css">150px</span> tall, however,
	the blue <span id="ref-for-color-stop③⑤">color stop’s</span> position would be equivalent to <span class="css">75px</span>,
	which precedes the yellow <span id="ref-for-color-stop③⑥">color stop</span>,
	and would be corrected to a position of <span class="css">100px</span>.
	Additionally, since the relative ordering of such color stops
	cannot be determined without performing layout,
	they will not interpolate smoothly in <a href="http://www.w3.org/TR/css-animations/">animations</a> or <a href="http://www.w3.org/TR/css-transitions/">transitions</a>.</p>
   <div class="example" id="example-996853e0">
    <a class="self-link" href="#example-996853e0"></a> Below are several pairs of gradients.
		The latter of each pair is a manually “fixed-up” version of the former,
		obtained by applying the above rules.
		For each pair, both gradients will render identically. <span class="note">The numbers in each arrow specify which fixup steps are invoked in the transformation.</span> 
<pre>1. linear-gradient(red, white 20%, blue)
   =1=>
   linear-gradient(red 0%, white 20%, blue 100%)

2. linear-gradient(red 40%, white, black, blue)
   =1,3=>
   linear-gradient(red 40%, white 60%, black 80%, blue 100%)

3. linear-gradient(red -50%, white, blue)
   =1,3=>
   linear-gradient(red -50%, white 25%, blue 100%)

4. linear-gradient(red -50px, white, blue)
   =1,3=>
   linear-gradient(red -50px, white calc(-25px + 50%), blue 100%)

5. linear-gradient(red 20px, white 0px, blue 40px)
   =2=>
   linear-gradient(red 20px, white 20px, blue 40px)

6. linear-gradient(red, white -50%, black 150%, blue)
   =1,2=>
   linear-gradient(red 0%, white 0%, black 150%, blue 150%)

7. linear-gradient(red 80px, white 0px, black, blue 100px)
   =2,3=>
   linear-gradient(red 80px, white 80px, black 90px, blue 100px)
</pre>
   </div>
   <h2 class="heading settled" data-level="4" id="stripes"><span class="secno">4. </span><span class="content">1D Image Values: the <span class="css">stripes()</span> notation</span><a class="self-link" href="#stripes"></a></h2>
   <p class="issue" id="issue-34ec5a23"><a class="self-link" href="#issue-34ec5a23"></a> <a href="https://github.com/w3c/csswg-drafts/issues/2532">Per WG resolution</a>,
	define the <span class="css">stripes()</span> function
	which creates a 1D image for use in borders/outlines.</p>
   <h2 class="heading settled" data-level="5" id="sizing"><span class="secno">5. </span><span class="content">Sizing Images and Objects in CSS</span><a class="self-link" href="#sizing"></a></h2>
   <h3 class="heading settled" data-level="5.1" id="the-object-fit"><span class="secno">5.1. </span><span class="content">Sizing Objects: the <a class="property" data-link-type="propdesc" href="#propdef-object-fit" id="ref-for-propdef-object-fit">object-fit</a> property</span><a class="self-link" href="#the-object-fit"></a></h3>
   <table class="def propdef" data-link-for-hint="object-fit">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-object-fit">object-fit</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod">fill <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①④">|</a> none <span id="ref-for-comb-one①⑤">|</span> [contain <span id="ref-for-comb-one①⑥">|</span> cover] <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-any" id="ref-for-comb-any">||</a> scale-down 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>fill 
     <tr>
      <th>Applies to:
      <td>replaced elements 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>n/a 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>specified keyword(s) 
     <tr>
      <th>Canonical order:
      <td>per grammar 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>discrete 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#propdef-object-fit" id="ref-for-propdef-object-fit①">object-fit</a> property specifies how the contents of a replaced element
	should be fitted to the box established by its used height and width.</p>
   <dl>
    <dt><dfn class="css" data-dfn-for="object-fit" data-dfn-type="value" data-export id="valdef-object-fit-fill">fill<a class="self-link" href="#valdef-object-fit-fill"></a></dfn> 
    <dd> The replaced content is sized to fill the element’s content box:
			the object’s <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#concrete-object-size" id="ref-for-concrete-object-size⑨">concrete object size</a> is the element’s used width and height. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="object-fit" data-dfn-type="value" data-export id="valdef-object-fit-none">none</dfn> 
    <dd> The replaced content is not resized to fit inside the element’s content box:
			determine the object’s <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#concrete-object-size" id="ref-for-concrete-object-size①⓪">concrete object size</a> using the <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#default-sizing-algorithm" id="ref-for-default-sizing-algorithm">default sizing algorithm</a> with no specified size,
			and a <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#default-object-size" id="ref-for-default-object-size①">default object size</a> equal to the replaced element’s used width and height. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="object-fit" data-dfn-type="value" data-export id="valdef-object-fit-contain">contain</dfn> 
    <dd>
      The replaced content is sized to maintain its aspect ratio
			while fitting within the element’s content box:
			its <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#concrete-object-size" id="ref-for-concrete-object-size①①">concrete object size</a> is resolved as a <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#contain-constraint" id="ref-for-contain-constraint">contain constraint</a> against the element’s used width and height. 
     <p>If the <a class="css" data-link-type="maybe" href="#valdef-object-fit-scale-down" id="ref-for-valdef-object-fit-scale-down">scale-down</a> flag is used, size the content as if <a class="css" data-link-type="maybe" href="#valdef-object-fit-none" id="ref-for-valdef-object-fit-none">none</a> or <a class="css" data-link-type="maybe" href="#valdef-object-fit-contain" id="ref-for-valdef-object-fit-contain">contain</a> were specified,
			whichever would result in a smaller <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#concrete-object-size" id="ref-for-concrete-object-size①②">concrete object size</a>.</p>
     <p class="note" role="note"><span>Note:</span> Both <a class="css" data-link-type="maybe" href="#valdef-object-fit-none" id="ref-for-valdef-object-fit-none①">none</a> and <a class="css" data-link-type="maybe" href="#valdef-object-fit-contain" id="ref-for-valdef-object-fit-contain①">contain</a> respect the content’s intrinsic aspect ratio,
			so the concept of "smaller" is well-defined.</p>
    <dt><dfn class="dfn-paneled css" data-dfn-for="object-fit" data-dfn-type="value" data-export id="valdef-object-fit-cover">cover</dfn> 
    <dd>
      The replaced content is sized to maintain its aspect ratio
			while filling the element’s entire content box:
			its <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#concrete-object-size" id="ref-for-concrete-object-size①③">concrete object size</a> is resolved as a <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#cover-constraint" id="ref-for-cover-constraint">cover constraint</a> against the element’s used width and height. 
     <p>If the <a class="css" data-link-type="maybe" href="#valdef-object-fit-scale-down" id="ref-for-valdef-object-fit-scale-down①">scale-down</a> flag is used, size the content as if <a class="css" data-link-type="maybe" href="#valdef-object-fit-none" id="ref-for-valdef-object-fit-none②">none</a> or <a class="css" data-link-type="maybe" href="#valdef-object-fit-cover" id="ref-for-valdef-object-fit-cover">cover</a> were specified,
			whichever would result in a smaller <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#concrete-object-size" id="ref-for-concrete-object-size①④">concrete object size</a>.</p>
     <p class="note" role="note"><span>Note:</span> Both <a class="css" data-link-type="maybe" href="#valdef-object-fit-none" id="ref-for-valdef-object-fit-none③">none</a> and <a class="css" data-link-type="maybe" href="#valdef-object-fit-cover" id="ref-for-valdef-object-fit-cover①">cover</a> respect the content’s intrinsic aspect ratio,
			so the concept of "smaller" is well-defined.</p>
    <dt><dfn class="dfn-paneled css" data-dfn-for="object-fit" data-dfn-type="value" data-export id="valdef-object-fit-scale-down">scale-down</dfn> 
    <dd> Equivalent to <span class="css">contain scale-down</span>. 
   </dl>
   <p>If the content does not completely fill the replaced element’s content box,
	the unfilled space shows the replaced element’s background.
	Since replaced elements always clip their contents to the content box,
	the content will never overflow.
	See the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-images-3/#propdef-object-position" id="ref-for-propdef-object-position">object-position</a> property for positioning the object with respect to the content box.</p>
   <figure>
     <img alt src="images/img_scale.png" style="border: thin solid black;"> 
    <figcaption> An example showing how four of the values of <a class="property" data-link-type="propdesc" href="#propdef-object-fit" id="ref-for-propdef-object-fit②">object-fit</a> cause the replaced element (blue figure)
			to be scaled to fit its height/width box (shown with a green background),
			using the initial value for <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-images-3/#propdef-object-position" id="ref-for-propdef-object-position①">object-position</a>.
			In this case, <a class="css" data-link-type="maybe" href="#valdef-object-fit-scale-down" id="ref-for-valdef-object-fit-scale-down②">scale-down</a> and <span class="css">scale-down contain</span> would look identical to <a class="css" data-link-type="maybe" href="#valdef-object-fit-contain" id="ref-for-valdef-object-fit-contain②">contain</a>,
			and <span class="css">scale-down cover</span> would look identical to <a class="css" data-link-type="maybe" href="#valdef-object-fit-none" id="ref-for-valdef-object-fit-none④">none</a>. </figcaption>
   </figure>
   <p class="note" role="note"><span>Note:</span> The <a class="property" data-link-type="propdesc" href="#propdef-object-fit" id="ref-for-propdef-object-fit③">object-fit</a> property has similar semantics to
	the <code>fit</code> attribute in <a data-link-type="biblio" href="#biblio-smil10">[SMIL10]</a> and the <a class="production css" data-link-type="type">&lt;meetOrSlice></a> parameter
	on the <a href="https://www.w3.org/TR/SVG11/coords.html#PreserveAspectRatioAttribute"><code>preserveAspectRatio</code> attribute</a> in <a data-link-type="biblio" href="#biblio-svg11">[SVG11]</a>.</p>
   <p class="note" role="note"><span>Note:</span> Per the <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#object-size-negotiation" id="ref-for-object-size-negotiation①">object size negotiation</a> algorithm,
	the <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#concrete-object-size" id="ref-for-concrete-object-size①⑤">concrete object size</a> (or, in this case, the size of the content)
	does not directly scale the object itself -
	it is merely passed to the object as information about the size of the visible canvas.
	How to then draw into that size is up to the image format.
	In particular, raster images always scale to the given size,
	while SVG uses the given size as the size of the "SVG Viewport"
	(a term defined by SVG)
	and then uses the values of several attributes on the root <code>&lt;svg></code> element to determine how to draw itself.</p>
   <h2 class="heading settled" data-level="6" id="image-processing"><span class="secno">6. </span><span class="content">Image Processing</span><a class="self-link" href="#image-processing"></a></h2>
   <h3 class="heading settled" data-level="6.1" id="the-image-resolution"><span class="secno">6.1. </span><span class="content">Overriding Image Resolutions: the <a class="property" data-link-type="propdesc" href="#propdef-image-resolution" id="ref-for-propdef-image-resolution">image-resolution</a> property</span><a class="self-link" href="#the-image-resolution"></a></h3>
   <p>The <dfn data-dfn-type="dfn" data-export id="image-resolution">image resolution<a class="self-link" href="#image-resolution"></a></dfn> is defined as
	the number of image pixels per unit length,
	e.g., pixels per inch.
	Some image formats can record information about the resolution of images.
	This information can be helpful when determining the actual size of the image in the formatting process.
	However, the information can also be wrong,
	in which case it should be ignored.
	By default, CSS assumes a resolution of one image pixel per CSS <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-4/#px" id="ref-for-px①">px</a> unit;
	however, the <a class="property" data-link-type="propdesc" href="#propdef-image-resolution" id="ref-for-propdef-image-resolution①">image-resolution</a> property allows using some other resolution.</p>
   <table class="def propdef" data-link-for-hint="image-resolution">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-image-resolution">image-resolution</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod">[ from-image <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-any" id="ref-for-comb-any①">||</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#resolution-value" id="ref-for-resolution-value②" title="Expands to: dppx | x | dpcm | dpi">&lt;resolution></a> ] <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-all" id="ref-for-comb-all③">&amp;&amp;</a> snap<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt①⓪">?</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>1dppx 
     <tr>
      <th>Applies to:
      <td><a href="https://drafts.csswg.org/css-pseudo/#generated-content" title="Includes ::before and ::after pseudo-elements.">all elements</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>yes 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>n/a 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>specified keyword(s) and/or <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#resolution-value" id="ref-for-resolution-value③" title="Expands to: dppx | x | dpcm | dpi">&lt;resolution></a> (possibly adjusted for <a class="css" data-link-type="maybe" href="#valdef-image-resolution-snap" id="ref-for-valdef-image-resolution-snap">snap</a>, see below) 
     <tr>
      <th>Canonical order:
      <td>per grammar 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>discrete 
   </table>
   <p class="issue" id="issue-8ce643a0"><a class="self-link" href="#issue-8ce643a0"></a> The <a class="css" data-link-type="maybe" href="#funcdef-image-set" id="ref-for-funcdef-image-set①⓪">image-set()</a> notation can alter the intrinsic resolution of an image,
	which ideally would be automatically honored without having to set this property.
	How should we best address this?
	Change the initial value to <span class="css">auto</span>, meaning "1dppx, unless CSS says otherwise"?
	Say that image-resolution has no effect on images whose resolution was set by something else in CSS?
	Or somehow wordsmithing <span class="css" id="ref-for-funcdef-image-set①①">image-set()</span> in some way such that it always produces <span class="css">1dppx</span> images somehow?</p>
   <p>The <a class="property" data-link-type="propdesc" href="#propdef-image-resolution" id="ref-for-propdef-image-resolution②">image-resolution</a> property specifies the <a data-link-type="dfn" href="#intrinsic-resolution" id="ref-for-intrinsic-resolution①">intrinsic resolution</a> of all raster images used in or on the element.
	It affects both content images
	(e.g. replaced elements and generated content)
	and decorative images
	(such as <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-image" id="ref-for-propdef-background-image②">background-image</a>).
	The <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="intrinsic-resolution">intrinsic resolution</dfn> of an image is used to determine the image’s <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#intrinsic-dimensions" id="ref-for-intrinsic-dimensions②">intrinsic dimensions</a>.
	Values have the following meanings:</p>
   <dl>
    <dt><dfn class="css" data-dfn-for="image-resolution" data-dfn-type="value" data-export id="valdef-image-resolution-resolution"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#resolution-value" id="ref-for-resolution-value④" title="Expands to: dppx | x | dpcm | dpi">&lt;resolution></a><a class="self-link" href="#valdef-image-resolution-resolution"></a></dfn> 
    <dd> Specifies the intrinsic resolution explicitly.
			A "dot" in this case corresponds to a single image pixel. 
    <dt><dfn class="css" data-dfn-for="image-resolution" data-dfn-type="value" data-export id="valdef-image-resolution-from-image">from-image<a class="self-link" href="#valdef-image-resolution-from-image"></a></dfn> 
    <dd> The image’s intrinsic resolution is taken as that specified by the image format.
			If the image does not specify its own resolution,
			the explicitly specified resolution is used (if given),
			else it defaults to <span class="css">1dppx</span>. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="image-resolution" data-dfn-type="value" data-export id="valdef-image-resolution-snap">snap</dfn> 
    <dd> If the "snap" keyword is provided,
			the computed <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#resolution-value" id="ref-for-resolution-value⑤" title="Expands to: dppx | x | dpcm | dpi">&lt;resolution></a> (if any)
			is the specified resolution rounded to the nearest value
			that would map one image pixel to an integer number of device pixels.
			If the resolution is taken from the image,
			then the used intrinsic resolution is the image’s native resolution similarly adjusted. 
   </dl>
   <p>As vector formats such as SVG do not have an intrinsic resolution,
	this property has no effect on vector images.</p>
   <div class="example" id="example-6e59c6a6">
    <a class="self-link" href="#example-6e59c6a6"></a> Printers tend to have substantially higher resolution than computer monitors;
		due to this, an image that looks fine on the screen may look pixellated when printed out.
		The <a class="property" data-link-type="propdesc" href="#propdef-image-resolution" id="ref-for-propdef-image-resolution③">image-resolution</a> property can be used to embed a high-resolution image into the document
		and maintain an appropriate size,
		ensuring attractive display both on screen and on paper: 
<pre class="lang-css highlight"><c- f>img.high-res </c-><c- p>{</c->
  <c- k>image-resolution</c-><c- p>:</c-> <c- m>300</c-><c- l>dpi</c-><c- p>;</c->
<c- p>}</c->
</pre>
    <p>With this set, an image meant to be 5 inches wide at 300dpi
		will actually display as 5in wide;
		without this set,
		the image would display as approximately 15.6in wide
		since the image is 15000 image pixels across,
		and by default CSS displays 96 image pixels per inch.</p>
   </div>
   <div class="example" id="example-ae06389c">
    <a class="self-link" href="#example-ae06389c"></a> Some image formats can encode the image resolution into the image data.
		This rule specifies that the UA should use the image resolution found in the image itself,
		falling back to 1 image pixel per CSS <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-4/#px" id="ref-for-px②">px</a> unit. 
<pre class="lang-css highlight"><c- f>img </c-><c- p>{</c-> <c- k>image-resolution</c-><c- p>:</c-> from-image <c- p>}</c-></pre>
    <p>These rules both specify that the UA should use the image resolution found in the image itself,
		but if the image has no resolution,
		the resolution is set to <span class="css">300dpi</span> instead of the default <span class="css">1dppx</span>.</p>
<pre class="lang-css highlight"><c- f>img </c-><c- p>{</c-> <c- k>image-resolution</c-><c- p>:</c-> from-image <c- m>300</c-><c- l>dpi</c-> <c- p>}</c->
<c- f>img </c-><c- p>{</c-> <c- k>image-resolution</c-><c- p>:</c-> <c- m>300</c-><c- l>dpi</c-> from-image <c- p>}</c->
</pre>
   </div>
   <div class="example" id="example-3b1f0fe1">
    <a class="self-link" href="#example-3b1f0fe1"></a> Using this rule, the image resolution is set to 300dpi.
		(The resolution in the image, if any, is ignored.) 
<pre class="lang-css highlight"><c- f>img </c-><c- p>{</c-> <c- k>image-resolution</c-><c- p>:</c-> <c- m>300</c-><c- l>dpi</c-> <c- p>}</c-></pre>
    <p>This rule, on the other hand,
		if used when the screen’s resolution is 96dpi,
		would instead render the image at 288dpi
		(so that 3 image pixels map to 1 device pixel):</p>
<pre class="lang-css highlight"><c- f>img </c-><c- p>{</c-> <c- k>image-resolution</c-><c- p>:</c-> <c- m>300</c-><c- l>dpi</c-> snap<c- p>;</c-> <c- p>}</c-></pre>
    <p>The <a class="css" data-link-type="maybe" href="#valdef-image-resolution-snap" id="ref-for-valdef-image-resolution-snap①">snap</a> keyword can also be used when the resolution is taken from the image:</p>
<pre class="lang-css highlight"><c- f>img </c-><c- p>{</c-> <c- k>image-resolution</c-><c- p>:</c-> snap from-image<c- p>;</c-> <c- p>}</c-></pre>
    <p>An image declaring itself as 300dpi will,
		in the situation above,
		display at 288dpi
		(3 image pixels per device pixel)
		whereas an image declaring 72dpi will render at 96dpi
		(1 image pixel per device pixel).</p>
   </div>
   <h2 class="heading settled" data-level="7" id="interpolation"><span class="secno">7. </span><span class="content">Interpolation</span><a class="self-link" href="#interpolation"></a></h2>
   <p>This section describes how to interpolate between new value types defined in this specification,
	for use with modules such as CSS Transitions and CSS Animations.</p>
   <p>If an algorithm below simply states that two values should be "interpolated" or "transitioned" without further details,
	then the value should be interpolated as described by the Transitions spec.
	Otherwise, the algorithm may reference a variable <var>t</var> in its detailed description of the interpolation.
	This is a number which starts at 0% and goes to 100%,
	and is set to a value that represents the progress through the transition,
	based on the duration of the transition,
	the elapsed time,
	and the timing function in use.
	For example, with a linear timing function and a 1s duration,
	after .3s <var>t</var> is equal to 30%.</p>
   <h3 class="heading settled" data-level="7.1" id="interpolating-images"><span class="secno">7.1. </span><span class="content">Interpolating <a class="production css" data-link-type="type" href="#typedef-image" id="ref-for-typedef-image①⑦">&lt;image></a></span><a class="self-link" href="#interpolating-images"></a></h3>
   <p>All images can be interpolated,
	though some special types of images
	(like some gradients)
	have their own special interpolation rules.
	In general terms,
	images are interpolated by scaling them to the size of the <var>start image</var> and cross-fading the two while they transition to the size of the <var>end image</var>.</p>
   <p>In specific terms,
	at each point in the interpolation
	the image is equal to <code>cross-fade( (100% - <var>t</var>) <var>start image</var>, <var>end image</var>)</code>.</p>
   <p class="issue" id="issue-d366087c"><a class="self-link" href="#issue-d366087c"></a> Special-case interpolating to/from no image,
	like "background-image: url(foo);" to "background-image: none;".</p>
   <h3 class="heading settled" data-level="7.2" id="interpolating-image-combinations"><span class="secno">7.2. </span><span class="content">Interpolating cross-fade()</span><a class="self-link" href="#interpolating-image-combinations"></a></h3>
   <p>The three components of <a class="css" data-link-type="maybe" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade①⑤">cross-fade()</a> are interpolated independently.
	Note this may result in nested <span class="css" id="ref-for-funcdef-cross-fade①⑥">cross-fade()</span> notations.</p>
   <h3 class="heading settled" data-level="7.3" id="interpolating-gradients"><span class="secno">7.3. </span><span class="content">Interpolating <a class="production css" data-link-type="type" href="#typedef-gradient" id="ref-for-typedef-gradient②">&lt;gradient></a></span><a class="self-link" href="#interpolating-gradients"></a></h3>
   <p class="issue" id="issue-f1783900"><a class="self-link" href="#issue-f1783900"></a> This section needs review and improvement.
	In particular, I believe the handling of linear-gradient() is incomplete -
	I think we want to specifically interpolate the "length" of the gradient line
	(the distance between 0% and 100%)
	between the starting and ending positions explicitly,
	so it doesn’t grow and then shrink over a single animation.</p>
   <p>Gradient images can be interpolated directly in CSS transitions and animations,
	smoothly animating from one gradient to another.
	There are only a few restrictions on what gradients are allowed to be interpolated:</p>
   <ol>
    <li data-md>
     <p>Both the starting and ending gradient must be expressed with the same function.
(For example, you can transition from a <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-images-3/#funcdef-linear-gradient" id="ref-for-funcdef-linear-gradient③">linear-gradient()</a> to a <span class="css" id="ref-for-funcdef-linear-gradient④">linear-gradient()</span>,
but not from a <span class="css" id="ref-for-funcdef-linear-gradient⑤">linear-gradient()</span> to a <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-images-3/#funcdef-radial-gradient" id="ref-for-funcdef-radial-gradient③">radial-gradient()</a> or a <a class="css" data-link-type="maybe" href="#funcdef-repeating-linear-gradient" id="ref-for-funcdef-repeating-linear-gradient②">repeating-linear-gradient()</a>.)</p>
    <li data-md>
     <p>Both the starting and ending gradient must have the same number of <a class="production css" data-link-type="type" href="#typedef-color-stop" id="ref-for-typedef-color-stop">&lt;color-stop></a>s.
For this purpose, all repeating gradients are considered to have infinite color stops,
and thus all repeating gradients match in this respect.</p>
    <li data-md>
     <p>Neither gradient uses a combination of <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value" id="ref-for-length-value③" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a> and <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#percentage-value" id="ref-for-percentage-value③">&lt;percentage></a> color stops.</p>
   </ol>
   <p>If the two gradients satisfy all of those constraints,
	they must be interpolated as described below.
	If they fail the third one only,
	they must be abruptly transitioned at 50%
	(unless otherwise specified by a future specification).
	If they fail either of the first two constraints,
	they must be interpolated using <a class="css" data-link-type="maybe" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade①⑦">cross-fade()</a> as for generic images.</p>
   <p class="note" role="note"><span>Note:</span> The abrupt transition at 50% is so that content will not rely on cross-fading,
	and smarter interpolation rules can be added for this case in the future.</p>
   <ol>
    <li data-md>
     <p>Convert both the start and end gradients to their explicit forms:</p>
     <dl>
      <dt data-md>For linear gradients:
      <dd data-md>
       <ul>
        <li data-md>
         <p>If the direction is specified as an <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#angle-value" id="ref-for-angle-value⑤" title="Expands to: turn | rad | grad | deg">&lt;angle></a>,
it is already in its explicit form.</p>
        <li data-md>
         <p>Otherwise,
change its direction to an <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#angle-value" id="ref-for-angle-value⑥" title="Expands to: turn | rad | grad | deg">&lt;angle></a> in [<span class="css">0deg</span>,<span class="css">360deg</span>)
that would produce an equivalent rendering.</p>
         <p>If both the start and end gradients had their direction specified with keywords,
and the absolute difference between the angles their directions mapped to is greater than 180deg,
add 360deg to the direction of the gradient with the smaller angle. <span class="note">This ensures that a transition from, for example,
"to left" (270deg) to "to top" (0deg)
rotates the gradient a quarter-turn clockwise,
as expected,
rather than rotating three-quarters of a turn counter-clockwise.</span></p>
       </ul>
      <dt data-md>For radial gradients:
      <dd data-md>
       <ul>
        <li data-md>
         <p>If the size is specified as two <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value" id="ref-for-length-value④" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a>s or <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#percentage-value" id="ref-for-percentage-value④">&lt;percentage></a>s,
it is already in its explicit form.</p>
        <li data-md>
         <p>Otherwise, the size must be changed to a pair of <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value" id="ref-for-length-value⑤" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a>s
that would produce an equivalent ending-shape.
If the <a class="production css" data-link-type="type">&lt;ending-shape></a> was specified as <a class="css" data-link-type="value" href="https://drafts.csswg.org/css-images-3/#valdef-ending-shape-circle" id="ref-for-valdef-ending-shape-circle">circle</a>,
change it to <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-images-3/#valdef-ending-shape-ellipse" id="ref-for-valdef-ending-shape-ellipse">ellipse</a>.</p>
       </ul>
     </dl>
    <li data-md>
     <p>Interpolate each component and color-stop of the gradients independently.
For linear gradients,
the only component is the angle.
For radial gradients,
the components are the horizontal and vertical position of the center
and the horizontal and vertical axis lengths.</p>
    <li data-md>
     <p>To interpolate a color-stop,
first match each color-stop in the start gradient
to the corresponding color-stop at the same index in the end gradient.
For repeating gradients,
the first specified color-stop in the start and end gradients
are considered to be at the same index,
and all other color-stops following and preceding are indexed appropriately,
repeating and shifting each gradient’s list of color-stops as needed.
Then, for each pair of color-stops,
interpolate the position and color independently.</p>
   </ol>
   <h2 class="heading settled" data-level="8" id="serialization"><span class="secno">8. </span><span class="content">Serialization</span><a class="self-link" href="#serialization"></a></h2>
   <p>This section describes the serialization of all new properties and value types introduced in this specification,
	for the purpose of interfacing with the CSS Object Model <a data-link-type="biblio" href="#biblio-cssom">[CSSOM]</a>.</p>
   <p>To serialize any function defined in this module,
	serialize it per its individual grammar,
	in the order its grammar is written in,
	omitting components when possible without changing the meaning,
	joining space-separated tokens with a single space,
	and following each serialized comma with a single space.</p>
   <p>For <a class="css" data-link-type="maybe" href="#funcdef-cross-fade" id="ref-for-funcdef-cross-fade①⑧">cross-fade()</a>,
	always serialize the <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#percentage-value" id="ref-for-percentage-value⑤">&lt;percentage></a>.</p>
   <div class="example" id="example-33854bc0">
    <a class="self-link" href="#example-33854bc0"></a> For example, a gradient specified as: 
<pre>Linear-Gradient( to bottom, red 0%,yellow,black 100px)</pre>
    <p>must serialize as:</p>
<pre>linear-gradient(red, yellow, black 100px)</pre>
   </div>
   <h2 class="heading settled" data-level="9" id="privsec"><span class="secno">9. </span><span class="content">Privacy and Security Considerations</span><a class="self-link" href="#privsec"></a></h2>
   <p class="note" role="note"><span>Note:</span> No change from <a data-link-type="biblio" href="#biblio-css3-images">[css3-images]</a>.</p>
   <h2 class="heading settled" data-level="10" id="changes"><span class="secno">10. </span><span class="content">Changes</span><a class="self-link" href="#changes"></a></h2>
   <h3 class="no-num heading settled" id="changes-20120911"><span class="content"> Changes Since the <a href="https://www.w3.org/TR/2012/WD-css4-images-20120911/">11 September 2012 Working Draft</a></span><a class="self-link" href="#changes-20120911"></a></h3>
   <ul>
    <li data-md>
     <p>Added <a href="#color-stop-syntax">color interpolation hints</a></p>
    <li data-md>
     <p>Added the <a href="#color-stop-syntax">two location syntax</a> for gradient color stops</p>
    <li data-md>
     <p>Added start angles to <a href="#conic-gradients">conic gradients</a></p>
    <li data-md>
     <p>The position(s) of a color stop can now come before the color</p>
    <li data-md>
     <p>Text that is identical to <a data-link-type="biblio" href="#biblio-css3-images">[css3-images]</a> has been replaced with a reference to <span>[css3-images]</span>.</p>
   </ul>
   <h3 class="no-num heading settled" id="changes-3"><span class="content"> Changes Since Level 3</span><a class="self-link" href="#changes-3"></a></h3>
   <ul>
    <li data-md>
     <p>Added the <a class="css" data-link-type="maybe" href="#funcdef-image" id="ref-for-funcdef-image①⑦">image()</a> notation (deferred from Level 3)</p>
    <li data-md>
     <p>Added the <a class="property" data-link-type="propdesc" href="#propdef-image-resolution" id="ref-for-propdef-image-resolution④">image-resolution</a> property (deferred from Level 3)</p>
    <li data-md>
     <p>Added the <a class="css" data-link-type="maybe" href="#funcdef-element" id="ref-for-funcdef-element②⓪">element()</a> notation (deferred from Level 3)</p>
    <li data-md>
     <p>Added <a href="#conic-gradients">conic gradients</a></p>
   </ul>
  </main>
  <h2 class="no-ref no-num heading settled" id="conformance"><span class="content"> Conformance</span><a class="self-link" href="#conformance"></a></h2>
  <h3 class="heading settled" id="document-conventions"><span class="content"> Document conventions</span><a class="self-link" href="#document-conventions"></a></h3>
  <p>Conformance requirements are expressed with a combination of
	descriptive assertions and RFC 2119 terminology. The key words “MUST”,
	“MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”,
	“RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this
	document are to be interpreted as described in RFC 2119.
	However, for readability, these words do not appear in all uppercase
	letters in this specification. </p>
  <p>All of the text of this specification is normative except sections
	explicitly marked as non-normative, examples, and notes. <a data-link-type="biblio" href="#biblio-rfc2119">[RFC2119]</a> </p>
  <p>Examples in this specification are introduced with the words “for example”
	or are set apart from the normative text with <code>class="example"</code>,
	like this: </p>
  <div class="example" id="example-ae2b6bc0">
   <a class="self-link" href="#example-ae2b6bc0"></a> 
   <p>This is an example of an informative example. </p>
  </div>
  <p>Informative notes begin with the word “Note” and are set apart from the
	normative text with <code>class="note"</code>, like this: </p>
  <p class="note" role="note">Note, this is an informative note. </p>
  <p>Advisements are normative sections styled to evoke special attention and are
	set apart from other normative text with <code>&lt;strong class="advisement"></code>, like
	this: <strong class="advisement"> UAs MUST provide an accessible alternative. </strong> </p>
  <h3 class="heading settled" id="conform-classes"><span class="content"> Conformance classes</span><a class="self-link" href="#conform-classes"></a></h3>
  <p>Conformance to this specification
	is defined for three conformance classes: </p>
  <dl>
   <dt>style sheet 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#style-sheet">CSS
			style sheet</a>. 
   <dt>renderer 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that interprets the semantics of a style sheet and renders
			documents that use them. 
   <dt>authoring tool 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that writes a style sheet. 
  </dl>
  <p>A style sheet is conformant to this specification
	if all of its statements that use syntax defined in this module are valid
	according to the generic CSS grammar and the individual grammars of each
	feature defined in this module. </p>
  <p>A renderer is conformant to this specification
	if, in addition to interpreting the style sheet as defined by the
	appropriate specifications, it supports all the features defined
	by this specification by parsing them correctly
	and rendering the document accordingly. However, the inability of a
	UA to correctly render a document due to limitations of the device
	does not make the UA non-conformant. (For example, a UA is not
	required to render color on a monochrome monitor.) </p>
  <p>An authoring tool is conformant to this specification
	if it writes style sheets that are syntactically correct according to the
	generic CSS grammar and the individual grammars of each feature in
	this module, and meet all other conformance requirements of style sheets
	as described in this module. </p>
  <h3 class="heading settled" id="conform-responsible"><span class="content"> Requirements for Responsible Implementation of CSS</span><a class="self-link" href="#conform-responsible"></a></h3>
  <p>The following sections define several conformance requirements
		for implementing CSS responsibly,
		in a way that promotes interoperability in the present and future. </p>
  <h4 class="heading settled" id="conform-partial"><span class="content"> Partial Implementations</span><a class="self-link" href="#conform-partial"></a></h4>
  <p>So that authors can exploit the forward-compatible parsing rules to assign fallback values, <strong>CSS renderers <em>must</em> treat as invalid
		(and <a href="http://www.w3.org/TR/CSS2/conform.html#ignore">ignore as appropriate</a>)
		any at-rules, properties, property values, keywords, and other syntactic constructs
		for which they have no usable level of support</strong>.
		In particular, user agents <em>must not</em> selectively ignore
		unsupported property values and honor supported values in a single multi-value property declaration:
		if any value is considered invalid (as unsupported values must be),
		CSS requires that the entire declaration be ignored. </p>
  <h4 class="heading settled" id="conform-future-proofing"><span class="content"> Implementations of Unstable and Proprietary Features</span><a class="self-link" href="#conform-future-proofing"></a></h4>
  <p>To avoid clashes with future stable CSS features,
		the CSSWG recommends <a href="http://www.w3.org/TR/CSS/#future-proofing">following best practices</a> for the implementation of <a href="http://www.w3.org/TR/CSS/#unstable">unstable</a> features and <a href="http://www.w3.org/TR/CSS/#proprietary-extension">proprietary extensions</a> to CSS. </p>
  <h4 class="heading settled" id="conform-testing"><span class="content"> Implementations of CR-level Features</span><a class="self-link" href="#conform-testing"></a></h4>
  <p>Once a specification reaches the Candidate Recommendation stage,
		implementers should release an <a data-link-type="dfn" href="http://www.w3.org/TR/CSS/#vendor-prefix">unprefixed</a> implementation
		of any CR-level feature they can demonstrate
		to be correctly implemented according to spec,
		and should avoid exposing a prefixed variant of that feature. </p>
  <p>To establish and maintain the interoperability of CSS across
		implementations, the CSS Working Group requests that non-experimental
		CSS renderers submit an implementation report (and, if necessary, the
		testcases used for that implementation report) to the W3C before
		releasing an unprefixed implementation of any CSS features. Testcases
		submitted to W3C are subject to review and correction by the CSS
		Working Group. </p>
  <p>
   Further information on submitting testcases and implementation reports
		can be found from on the CSS Working Group’s website at <a href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
		Questions should be directed to the <a href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a> mailing list. 
<script src="https://www.w3.org/scripts/TR/2016/fixup.js"></script>
  </p>
  <aside class="caniuse-status" data-deco data-dfn-id="funcdef-image-set">
   <input class="caniuse-panel-btn" type="button" value="⋰">
   <p class="support"><b>Support:</b><span class="android no"><span>Android Browser</span><span>None</span></span><span class="baidu no"><span>Baidu Browser</span><span>None</span></span><span class="bb no"><span>Blackberry Browser</span><span>None</span></span><span class="chrome no"><span>Chrome</span><span>None</span></span><span class="and_chr no"><span>Chrome for Android</span><span>None</span></span><span class="edge no"><span>Edge</span><span>None</span></span><span class="firefox no"><span>Firefox</span><span>None</span></span><span class="and_ff no"><span>Firefox for Android</span><span>None</span></span><span class="ie no"><span>IE</span><span>None</span></span><span class="ie_mob no"><span>IE Mobile</span><span>None</span></span><span class="kaios no"><span>KaiOS Browser</span><span>None</span></span><span class="opera no"><span>Opera</span><span>None</span></span><span class="op_mini no"><span>Opera Mini</span><span>None</span></span><span class="op_mob no"><span>Opera Mobile</span><span>None</span></span><span class="and_qq no"><span>QQ Browser</span><span>None</span></span><span class="safari yes"><span>Safari</span><span>10+</span></span><span class="samsung no"><span>Samsung Internet</span><span>None</span></span><span class="and_uc no"><span>UC Browser for Android</span><span>None</span></span><span class="ios_saf yes"><span>iOS Safari</span><span>10.0+</span></span></p>
   <p class="caniuse">Source: <a href="https://caniuse.com/#feat=css-image-set">caniuse.com</a> as of 2019-06-04</p>
  </aside>
  <aside class="caniuse-status" data-deco data-dfn-id="funcdef-cross-fade">
   <input class="caniuse-panel-btn" type="button" value="⋰">
   <p class="support"><b>Support:</b><span class="android no"><span>Android Browser</span><span>None</span></span><span class="baidu no"><span>Baidu Browser</span><span>None</span></span><span class="bb no"><span>Blackberry Browser</span><span>None</span></span><span class="chrome no"><span>Chrome</span><span>None</span></span><span class="and_chr no"><span>Chrome for Android</span><span>None</span></span><span class="edge no"><span>Edge</span><span>None</span></span><span class="firefox no"><span>Firefox</span><span>None</span></span><span class="and_ff no"><span>Firefox for Android</span><span>None</span></span><span class="ie no"><span>IE</span><span>None</span></span><span class="ie_mob no"><span>IE Mobile</span><span>None</span></span><span class="kaios no"><span>KaiOS Browser</span><span>None</span></span><span class="opera no"><span>Opera</span><span>None</span></span><span class="op_mini no"><span>Opera Mini</span><span>None</span></span><span class="op_mob no"><span>Opera Mobile</span><span>None</span></span><span class="and_qq no"><span>QQ Browser</span><span>None</span></span><span class="safari yes"><span>Safari</span><span>10+</span></span><span class="samsung no"><span>Samsung Internet</span><span>None</span></span><span class="and_uc no"><span>UC Browser for Android</span><span>None</span></span><span class="ios_saf yes"><span>iOS Safari</span><span>10.0+</span></span></p>
   <p class="caniuse">Source: <a href="https://caniuse.com/#feat=css-cross-fade">caniuse.com</a> as of 2019-06-04</p>
  </aside>
  <aside class="caniuse-status" data-deco data-dfn-id="element-notation">
   <input class="caniuse-panel-btn" type="button" value="⋰">
   <p class="support"><b>Support:</b><span class="android no"><span>Android Browser</span><span>None</span></span><span class="baidu no"><span>Baidu Browser</span><span>None</span></span><span class="bb no"><span>Blackberry Browser</span><span>None</span></span><span class="chrome no"><span>Chrome</span><span>None</span></span><span class="and_chr no"><span>Chrome for Android</span><span>None</span></span><span class="edge no"><span>Edge</span><span>None</span></span><span class="firefox no"><span>Firefox</span><span>None</span></span><span class="and_ff no"><span>Firefox for Android</span><span>None</span></span><span class="ie no"><span>IE</span><span>None</span></span><span class="ie_mob no"><span>IE Mobile</span><span>None</span></span><span class="kaios no"><span>KaiOS Browser</span><span>None</span></span><span class="opera no"><span>Opera</span><span>None</span></span><span class="op_mini no"><span>Opera Mini</span><span>None</span></span><span class="op_mob no"><span>Opera Mobile</span><span>None</span></span><span class="and_qq no"><span>QQ Browser</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="samsung no"><span>Samsung Internet</span><span>None</span></span><span class="and_uc no"><span>UC Browser for Android</span><span>None</span></span><span class="ios_saf no"><span>iOS Safari</span><span>None</span></span></p>
   <p class="caniuse">Source: <a href="https://caniuse.com/#feat=css-element-function">caniuse.com</a> as of 2019-06-04</p>
  </aside>
  <h2 class="no-num no-ref heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2>
  <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3>
  <ul class="index">
   <li><a href="#valdef-conic-gradient-angle">&lt;angle></a><span>, in §3.3.1</span>
   <li><a href="#typedef-angular-color-hint">&lt;angular-color-hint></a><span>, in §3.5.1</span>
   <li><a href="#typedef-angular-color-stop">&lt;angular-color-stop></a><span>, in §3.5.1</span>
   <li><a href="#typedef-angular-color-stop-list">&lt;angular-color-stop-list></a><span>, in §3.5.1</span>
   <li><a href="#appearance-of-a-cross-fade">appearance of a cross-fade()</a><span>, in §2.5.2</span>
   <li><a href="#typedef-cf-image">&lt;cf-image></a><span>, in §2.5</span>
   <li><a href="#typedef-color-stop">&lt;color-stop></a><span>, in §3.5.1</span>
   <li><a href="#color-stop">color stop</a><span>, in §3.5</span>
   <li><a href="#typedef-color-stop-angle">&lt;color-stop-angle></a><span>, in §3.5.1</span>
   <li><a href="#typedef-color-stop-length">&lt;color-stop-length></a><span>, in §3.5.1</span>
   <li><a href="#color-stop-list">color stop list</a><span>, in §3.5.1</span>
   <li><a href="#typedef-color-stop-list">&lt;color-stop-list></a><span>, in §3.5.1</span>
   <li><a href="#color-transition-hint">color transition hint</a><span>, in §3.5</span>
   <li><a href="#computed-image">computed &lt;image></a><span>, in §2</span>
   <li><a href="#funcdef-conic-gradient">conic-gradient()</a><span>, in §3.3.1</span>
   <li><a href="#valdef-object-fit-contain">contain</a><span>, in §5.1</span>
   <li><a href="#valdef-object-fit-cover">cover</a><span>, in §5.1</span>
   <li><a href="#funcdef-cross-fade">cross-fade()</a><span>, in §2.5</span>
   <li><a href="#decorated-bounding-box">decorated bounding box</a><span>, in §2.6</span>
   <li><a href="#funcdef-element">element()</a><span>, in §2.6</span>
   <li><a href="#element-not-rendered">element-not-rendered</a><span>, in §2.6</span>
   <li><a href="#dom-css-elementsources">elementSources</a><span>, in §2.6.2</span>
   <li><a href="#ending-point">ending point</a><span>, in §3</span>
   <li><a href="#valdef-object-fit-fill">fill</a><span>, in §5.1</span>
   <li><a href="#valdef-image-resolution-from-image">from-image</a><span>, in §6.1</span>
   <li><a href="#typedef-gradient">&lt;gradient></a><span>, in §3</span>
   <li><a href="#gradient-box">gradient box</a><span>, in §3</span>
   <li><a href="#conic-gradient-gradient-center">gradient center</a><span>, in §3.3.1</span>
   <li><a href="#gradient-function">gradient function</a><span>, in §3</span>
   <li><a href="#gradient-line">gradient line</a><span>, in §3</span>
   <li><a href="#funcdef-image">image()</a><span>, in §2.4</span>
   <li><a href="#typedef-image">&lt;image></a><span>, in §2</span>
   <li><a href="#propdef-image-resolution">image-resolution</a><span>, in §6.1</span>
   <li><a href="#image-resolution">image resolution</a><span>, in §6.1</span>
   <li><a href="#funcdef-image-set">image-set()</a><span>, in §2.3</span>
   <li><a href="#typedef-image-set-option">&lt;image-set-option></a><span>, in §2.3</span>
   <li><a href="#typedef-image-src">&lt;image-src></a><span>, in §2.4</span>
   <li><a href="#typedef-image-tags">&lt;image-tags></a><span>, in §2.4</span>
   <li><a href="#intrinsic-dimensions-of-a-cross-fade">intrinsic dimensions of a cross-fade()</a><span>, in §2.5.1</span>
   <li><a href="#intrinsic-resolution">intrinsic resolution</a><span>, in §6.1</span>
   <li><a href="#invalid-image">invalid image</a><span>, in §2</span>
   <li><a href="#typedef-linear-color-hint">&lt;linear-color-hint></a><span>, in §3.5.1</span>
   <li><a href="#typedef-linear-color-stop">&lt;linear-color-stop></a><span>, in §3.5.1</span>
   <li><a href="#loading-image">loading image</a><span>, in §2</span>
   <li><a href="#valdef-object-fit-none">none</a><span>, in §5.1</span>
   <li><a href="#propdef-object-fit">object-fit</a><span>, in §5.1</span>
   <li><a href="#paint-source">paint source</a><span>, in §2.6.1</span>
   <li><a href="#valdef-conic-gradient-position">&lt;position></a><span>, in §3.3.1</span>
   <li><a href="#funcdef-repeating-conic-gradient">repeating-conic-gradient()</a><span>, in §3.4</span>
   <li><a href="#funcdef-repeating-linear-gradient">repeating-linear-gradient()</a><span>, in §3.4</span>
   <li><a href="#funcdef-repeating-radial-gradient">repeating-radial-gradient()</a><span>, in §3.4</span>
   <li><a href="#valdef-image-resolution-resolution">&lt;resolution></a><span>, in §6.1</span>
   <li><a href="#valdef-object-fit-scale-down">scale-down</a><span>, in §5.1</span>
   <li><a href="#valdef-image-resolution-snap">snap</a><span>, in §6.1</span>
   <li><a href="#starting-point">starting point</a><span>, in §3</span>
   <li><a href="#color-transition-hint">transition hint</a><span>, in §3.5</span>
   <li><a href="#invalid-image">valid image</a><span>, in §2</span>
  </ul>
  <aside class="dfn-panel" data-for="term-for-propdef-background-color">
   <a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-color">https://drafts.csswg.org/css-backgrounds-3/#propdef-background-color</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-background-color">2.4.3. Solid-color Images</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-background-image">
   <a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-image">https://drafts.csswg.org/css-backgrounds-3/#propdef-background-image</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-background-image">2. 2D Image Values: the &lt;image> type</a>
    <li><a href="#ref-for-propdef-background-image①">3.5.3. 
Color Stop “Fixup”</a>
    <li><a href="#ref-for-propdef-background-image②">6.1. Overriding Image Resolutions: the image-resolution property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-background-position">
   <a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-position">https://drafts.csswg.org/css-backgrounds-3/#propdef-background-position</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-background-position">3.3.1. 
conic-gradient() Syntax</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-background-size">
   <a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-size">https://drafts.csswg.org/css-backgrounds-3/#propdef-background-size</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-background-size">3. 
Gradients</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-valdef-background-position-center">
   <a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-position-center">https://drafts.csswg.org/css-backgrounds-3/#valdef-background-position-center</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-background-position-center">3.3.1. 
conic-gradient() Syntax</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-computed-value">
   <a href="https://drafts.csswg.org/css-cascade-4/#computed-value">https://drafts.csswg.org/css-cascade-4/#computed-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-computed-value">2. 2D Image Values: the &lt;image> type</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-specified-value">
   <a href="https://drafts.csswg.org/css-cascade-4/#specified-value">https://drafts.csswg.org/css-cascade-4/#specified-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-specified-value">2. 2D Image Values: the &lt;image> type</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-used-value">
   <a href="https://drafts.csswg.org/css-cascade-4/#used-value">https://drafts.csswg.org/css-cascade-4/#used-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-used-value">3.5.3. 
Color Stop “Fixup”</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-valuea-def-color">
   <a href="https://drafts.csswg.org/css-color-3/#valuea-def-color">https://drafts.csswg.org/css-color-3/#valuea-def-color</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valuea-def-color">2. 2D Image Values: the &lt;image> type</a>
    <li><a href="#ref-for-valuea-def-color①">2.4. Image Fallbacks and Annotations: the image() notation</a>
    <li><a href="#ref-for-valuea-def-color②">2.4.1. Image Fallbacks</a> <a href="#ref-for-valuea-def-color③">(2)</a>
    <li><a href="#ref-for-valuea-def-color④">2.4.3. Solid-color Images</a>
    <li><a href="#ref-for-valuea-def-color⑤">2.5. Combining images: the cross-fade() notation</a> <a href="#ref-for-valuea-def-color⑥">(2)</a>
    <li><a href="#ref-for-valuea-def-color⑦">2.5.1. cross-fade() Sizing</a>
    <li><a href="#ref-for-valuea-def-color⑧">2.5.2. cross-fade() Painting</a> <a href="#ref-for-valuea-def-color⑨">(2)</a>
    <li><a href="#ref-for-valuea-def-color①⓪">3.5. Defining Gradient Color</a>
    <li><a href="#ref-for-valuea-def-color①①">3.5.1. 
Color Stop Lists</a> <a href="#ref-for-valuea-def-color①②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-valdef-color-transparent">
   <a href="https://drafts.csswg.org/css-color-4/#valdef-color-transparent">https://drafts.csswg.org/css-color-4/#valdef-color-transparent</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-color-transparent">2. 2D Image Values: the &lt;image> type</a> <a href="#ref-for-valdef-color-transparent①">(2)</a>
    <li><a href="#ref-for-valdef-color-transparent②">2.5. Combining images: the cross-fade() notation</a>
    <li><a href="#ref-for-valdef-color-transparent③">2.6. Using Elements as Images: the element() notation</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-list-style-image">
   <a href="https://drafts.csswg.org/css-lists-3/#propdef-list-style-image">https://drafts.csswg.org/css-lists-3/#propdef-list-style-image</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-list-style-image">2. 2D Image Values: the &lt;image> type</a> <a href="#ref-for-propdef-list-style-image①">(2)</a>
    <li><a href="#ref-for-propdef-list-style-image②">3. 
Gradients</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-list-style-type">
   <a href="https://drafts.csswg.org/css-lists-3/#propdef-list-style-type">https://drafts.csswg.org/css-lists-3/#propdef-list-style-type</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-list-style-type">2. 2D Image Values: the &lt;image> type</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-valdef-list-style-type-none">
   <a href="https://drafts.csswg.org/css-lists-3/#valdef-list-style-type-none">https://drafts.csswg.org/css-lists-3/#valdef-list-style-type-none</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-list-style-type-none">2. 2D Image Values: the &lt;image> type</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-cursor">
   <a href="https://drafts.csswg.org/css-ui-4/#propdef-cursor">https://drafts.csswg.org/css-ui-4/#propdef-cursor</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-cursor">2. 2D Image Values: the &lt;image> type</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-angle-value">
   <a href="https://drafts.csswg.org/css-values-3/#angle-value">https://drafts.csswg.org/css-values-3/#angle-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-angle-value">3.3. 
Conic Gradients: the conic-gradient() notation</a>
    <li><a href="#ref-for-angle-value①">3.3.1. 
conic-gradient() Syntax</a> <a href="#ref-for-angle-value②">(2)</a> <a href="#ref-for-angle-value③">(3)</a>
    <li><a href="#ref-for-angle-value④">3.5.1. 
Color Stop Lists</a>
    <li><a href="#ref-for-angle-value⑤">7.3. Interpolating &lt;gradient></a> <a href="#ref-for-angle-value⑥">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-length-value">
   <a href="https://drafts.csswg.org/css-values-3/#length-value">https://drafts.csswg.org/css-values-3/#length-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-length-value">2. 2D Image Values: the &lt;image> type</a>
    <li><a href="#ref-for-length-value①">3.3. 
Conic Gradients: the conic-gradient() notation</a>
    <li><a href="#ref-for-length-value②">3.5.1. 
Color Stop Lists</a>
    <li><a href="#ref-for-length-value③">7.3. Interpolating &lt;gradient></a> <a href="#ref-for-length-value④">(2)</a> <a href="#ref-for-length-value⑤">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-percentage-value">
   <a href="https://drafts.csswg.org/css-values-3/#percentage-value">https://drafts.csswg.org/css-values-3/#percentage-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-percentage-value">2.5. Combining images: the cross-fade() notation</a> <a href="#ref-for-percentage-value①">(2)</a> <a href="#ref-for-percentage-value②">(3)</a>
    <li><a href="#ref-for-percentage-value③">7.3. Interpolating &lt;gradient></a> <a href="#ref-for-percentage-value④">(2)</a>
    <li><a href="#ref-for-percentage-value⑤">8. Serialization</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-resolution-value">
   <a href="https://drafts.csswg.org/css-values-3/#resolution-value">https://drafts.csswg.org/css-values-3/#resolution-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-resolution-value">2.3. Resolution Negotiation: the image-set() notation</a> <a href="#ref-for-resolution-value①">(2)</a>
    <li><a href="#ref-for-resolution-value②">6.1. Overriding Image Resolutions: the image-resolution property</a> <a href="#ref-for-resolution-value③">(2)</a> <a href="#ref-for-resolution-value④">(3)</a> <a href="#ref-for-resolution-value⑤">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-string-value">
   <a href="https://drafts.csswg.org/css-values-3/#string-value">https://drafts.csswg.org/css-values-3/#string-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-string-value">2.3. Resolution Negotiation: the image-set() notation</a> <a href="#ref-for-string-value①">(2)</a>
    <li><a href="#ref-for-string-value②">2.4. Image Fallbacks and Annotations: the image() notation</a> <a href="#ref-for-string-value③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-url-value">
   <a href="https://drafts.csswg.org/css-values-3/#url-value">https://drafts.csswg.org/css-values-3/#url-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-url-value">2. 2D Image Values: the &lt;image> type</a> <a href="#ref-for-url-value①">(2)</a> <a href="#ref-for-url-value②">(3)</a> <a href="#ref-for-url-value③">(4)</a>
    <li><a href="#ref-for-url-value④">2.3. Resolution Negotiation: the image-set() notation</a>
    <li><a href="#ref-for-url-value⑤">2.4. Image Fallbacks and Annotations: the image() notation</a> <a href="#ref-for-url-value⑥">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-mult-req">
   <a href="https://drafts.csswg.org/css-values-4/#mult-req">https://drafts.csswg.org/css-values-4/#mult-req</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-mult-req">2.4. Image Fallbacks and Annotations: the image() notation</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-mult-comma">
   <a href="https://drafts.csswg.org/css-values-4/#mult-comma">https://drafts.csswg.org/css-values-4/#mult-comma</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-mult-comma">2.3. Resolution Negotiation: the image-set() notation</a>
    <li><a href="#ref-for-mult-comma①">2.5. Combining images: the cross-fade() notation</a>
    <li><a href="#ref-for-mult-comma②">3.5.1. 
Color Stop Lists</a> <a href="#ref-for-mult-comma③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-comb-all">
   <a href="https://drafts.csswg.org/css-values-4/#comb-all">https://drafts.csswg.org/css-values-4/#comb-all</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-comb-all">2.5. Combining images: the cross-fade() notation</a>
    <li><a href="#ref-for-comb-all①">3.5.1. 
Color Stop Lists</a> <a href="#ref-for-comb-all②">(2)</a>
    <li><a href="#ref-for-comb-all③">6.1. Overriding Image Resolutions: the image-resolution property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-comb-comma">
   <a href="https://drafts.csswg.org/css-values-4/#comb-comma">https://drafts.csswg.org/css-values-4/#comb-comma</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-comb-comma">2.4. Image Fallbacks and Annotations: the image() notation</a>
    <li><a href="#ref-for-comb-comma①">3.3.1. 
conic-gradient() Syntax</a>
    <li><a href="#ref-for-comb-comma②">3.5.1. 
Color Stop Lists</a> <a href="#ref-for-comb-comma③">(2)</a> <a href="#ref-for-comb-comma④">(3)</a> <a href="#ref-for-comb-comma⑤">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-typedef-angle-percentage">
   <a href="https://drafts.csswg.org/css-values-4/#typedef-angle-percentage">https://drafts.csswg.org/css-values-4/#typedef-angle-percentage</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-angle-percentage">3.5.1. 
Color Stop Lists</a> <a href="#ref-for-typedef-angle-percentage①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-identifier-value">
   <a href="https://drafts.csswg.org/css-values-4/#identifier-value">https://drafts.csswg.org/css-values-4/#identifier-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-identifier-value">2.6.2. 
Using Out-Of-Document Sources: the ElementSources interface</a> <a href="#ref-for-identifier-value①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-typedef-length-percentage">
   <a href="https://drafts.csswg.org/css-values-4/#typedef-length-percentage">https://drafts.csswg.org/css-values-4/#typedef-length-percentage</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-length-percentage">3.5.1. 
Color Stop Lists</a> <a href="#ref-for-typedef-length-percentage①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-typedef-position">
   <a href="https://drafts.csswg.org/css-values-4/#typedef-position">https://drafts.csswg.org/css-values-4/#typedef-position</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-position">3.3.1. 
conic-gradient() Syntax</a> <a href="#ref-for-typedef-position①">(2)</a> <a href="#ref-for-typedef-position②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-mult-opt">
   <a href="https://drafts.csswg.org/css-values-4/#mult-opt">https://drafts.csswg.org/css-values-4/#mult-opt</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-mult-opt">2.4. Image Fallbacks and Annotations: the image() notation</a> <a href="#ref-for-mult-opt①">(2)</a> <a href="#ref-for-mult-opt②">(3)</a>
    <li><a href="#ref-for-mult-opt③">2.5. Combining images: the cross-fade() notation</a>
    <li><a href="#ref-for-mult-opt④">3.3.1. 
conic-gradient() Syntax</a> <a href="#ref-for-mult-opt⑤">(2)</a>
    <li><a href="#ref-for-mult-opt⑥">3.5.1. 
Color Stop Lists</a> <a href="#ref-for-mult-opt⑦">(2)</a> <a href="#ref-for-mult-opt⑧">(3)</a> <a href="#ref-for-mult-opt⑨">(4)</a>
    <li><a href="#ref-for-mult-opt①⓪">6.1. Overriding Image Resolutions: the image-resolution property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-px">
   <a href="https://drafts.csswg.org/css-values-4/#px">https://drafts.csswg.org/css-values-4/#px</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-px">2.6.1. 
Paint Sources</a>
    <li><a href="#ref-for-px①">6.1. Overriding Image Resolutions: the image-resolution property</a> <a href="#ref-for-px②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-funcdef-url">
   <a href="https://drafts.csswg.org/css-values-4/#funcdef-url">https://drafts.csswg.org/css-values-4/#funcdef-url</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-funcdef-url">2.2. Image References: the url() notation</a>
    <li><a href="#ref-for-funcdef-url①">2.4.2. Image Fragments</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-mult-num-range">
   <a href="https://drafts.csswg.org/css-values-4/#mult-num-range">https://drafts.csswg.org/css-values-4/#mult-num-range</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-mult-num-range">3.5.1. 
Color Stop Lists</a> <a href="#ref-for-mult-num-range①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-comb-one">
   <a href="https://drafts.csswg.org/css-values-4/#comb-one">https://drafts.csswg.org/css-values-4/#comb-one</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-comb-one">2. 2D Image Values: the &lt;image> type</a> <a href="#ref-for-comb-one①">(2)</a> <a href="#ref-for-comb-one②">(3)</a> <a href="#ref-for-comb-one③">(4)</a>
    <li><a href="#ref-for-comb-one④">2.3. Resolution Negotiation: the image-set() notation</a>
    <li><a href="#ref-for-comb-one⑤">2.4. Image Fallbacks and Annotations: the image() notation</a> <a href="#ref-for-comb-one⑥">(2)</a>
    <li><a href="#ref-for-comb-one⑦">2.5. Combining images: the cross-fade() notation</a>
    <li><a href="#ref-for-comb-one⑧">3. 
Gradients</a> <a href="#ref-for-comb-one⑨">(2)</a> <a href="#ref-for-comb-one①⓪">(3)</a> <a href="#ref-for-comb-one①①">(4)</a> <a href="#ref-for-comb-one①②">(5)</a>
    <li><a href="#ref-for-comb-one①③">3.5.1. 
Color Stop Lists</a>
    <li><a href="#ref-for-comb-one①④">5.1. Sizing Objects: the object-fit property</a> <a href="#ref-for-comb-one①⑤">(2)</a> <a href="#ref-for-comb-one①⑥">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-comb-any">
   <a href="https://drafts.csswg.org/css-values-4/#comb-any">https://drafts.csswg.org/css-values-4/#comb-any</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-comb-any">5.1. Sizing Objects: the object-fit property</a>
    <li><a href="#ref-for-comb-any①">6.1. Overriding Image Resolutions: the image-resolution property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-x43">
   <a href="https://drafts.csswg.org/css2/visuren.html#x43">https://drafts.csswg.org/css2/visuren.html#x43</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-x43">2.6. Using Elements as Images: the element() notation</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-valdef-ending-shape-circle">
   <a href="https://drafts.csswg.org/css-images-3/#valdef-ending-shape-circle">https://drafts.csswg.org/css-images-3/#valdef-ending-shape-circle</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-ending-shape-circle">7.3. Interpolating &lt;gradient></a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-concrete-object-size">
   <a href="https://drafts.csswg.org/css-images-3/#concrete-object-size">https://drafts.csswg.org/css-images-3/#concrete-object-size</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-concrete-object-size">2.5.1. cross-fade() Sizing</a>
    <li><a href="#ref-for-concrete-object-size①">2.5.2. cross-fade() Painting</a>
    <li><a href="#ref-for-concrete-object-size②">2.6.1. 
Paint Sources</a> <a href="#ref-for-concrete-object-size③">(2)</a> <a href="#ref-for-concrete-object-size④">(3)</a> <a href="#ref-for-concrete-object-size⑤">(4)</a> <a href="#ref-for-concrete-object-size⑥">(5)</a> <a href="#ref-for-concrete-object-size⑦">(6)</a>
    <li><a href="#ref-for-concrete-object-size⑧">3. 
Gradients</a>
    <li><a href="#ref-for-concrete-object-size⑨">5.1. Sizing Objects: the object-fit property</a> <a href="#ref-for-concrete-object-size①⓪">(2)</a> <a href="#ref-for-concrete-object-size①①">(3)</a> <a href="#ref-for-concrete-object-size①②">(4)</a> <a href="#ref-for-concrete-object-size①③">(5)</a> <a href="#ref-for-concrete-object-size①④">(6)</a> <a href="#ref-for-concrete-object-size①⑤">(7)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-contain-constraint">
   <a href="https://drafts.csswg.org/css-images-3/#contain-constraint">https://drafts.csswg.org/css-images-3/#contain-constraint</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-contain-constraint">5.1. Sizing Objects: the object-fit property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-cover-constraint">
   <a href="https://drafts.csswg.org/css-images-3/#cover-constraint">https://drafts.csswg.org/css-images-3/#cover-constraint</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-cover-constraint">5.1. Sizing Objects: the object-fit property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-default-object-size">
   <a href="https://drafts.csswg.org/css-images-3/#default-object-size">https://drafts.csswg.org/css-images-3/#default-object-size</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-default-object-size">3. 
Gradients</a>
    <li><a href="#ref-for-default-object-size①">5.1. Sizing Objects: the object-fit property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-default-sizing-algorithm">
   <a href="https://drafts.csswg.org/css-images-3/#default-sizing-algorithm">https://drafts.csswg.org/css-images-3/#default-sizing-algorithm</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-default-sizing-algorithm">5.1. Sizing Objects: the object-fit property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-valdef-ending-shape-ellipse">
   <a href="https://drafts.csswg.org/css-images-3/#valdef-ending-shape-ellipse">https://drafts.csswg.org/css-images-3/#valdef-ending-shape-ellipse</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-ending-shape-ellipse">7.3. Interpolating &lt;gradient></a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-intrinsic-dimensions">
   <a href="https://drafts.csswg.org/css-images-3/#intrinsic-dimensions">https://drafts.csswg.org/css-images-3/#intrinsic-dimensions</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-intrinsic-dimensions">2. 2D Image Values: the &lt;image> type</a>
    <li><a href="#ref-for-intrinsic-dimensions①">3. 
Gradients</a>
    <li><a href="#ref-for-intrinsic-dimensions②">6.1. Overriding Image Resolutions: the image-resolution property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-funcdef-linear-gradient">
   <a href="https://drafts.csswg.org/css-images-3/#funcdef-linear-gradient">https://drafts.csswg.org/css-images-3/#funcdef-linear-gradient</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-funcdef-linear-gradient">3. 
Gradients</a>
    <li><a href="#ref-for-funcdef-linear-gradient①">3.1. Linear Gradients: the linear-gradient() notation</a>
    <li><a href="#ref-for-funcdef-linear-gradient②">3.4. 
Repeating Gradients: the repeating-linear-gradient(), repeating-radial-gradient(), and repeating-conic-gradient() notations</a>
    <li><a href="#ref-for-funcdef-linear-gradient③">7.3. Interpolating &lt;gradient></a> <a href="#ref-for-funcdef-linear-gradient④">(2)</a> <a href="#ref-for-funcdef-linear-gradient⑤">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-object-size-negotiation">
   <a href="https://drafts.csswg.org/css-images-3/#object-size-negotiation">https://drafts.csswg.org/css-images-3/#object-size-negotiation</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-object-size-negotiation">2.5.1. cross-fade() Sizing</a>
    <li><a href="#ref-for-object-size-negotiation①">5.1. Sizing Objects: the object-fit property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-object-position">
   <a href="https://drafts.csswg.org/css-images-3/#propdef-object-position">https://drafts.csswg.org/css-images-3/#propdef-object-position</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-object-position">5.1. Sizing Objects: the object-fit property</a> <a href="#ref-for-propdef-object-position①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-funcdef-radial-gradient">
   <a href="https://drafts.csswg.org/css-images-3/#funcdef-radial-gradient">https://drafts.csswg.org/css-images-3/#funcdef-radial-gradient</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-funcdef-radial-gradient">3. 
Gradients</a>
    <li><a href="#ref-for-funcdef-radial-gradient①">3.2. Radial Gradients: the radial-gradient() notation</a>
    <li><a href="#ref-for-funcdef-radial-gradient②">3.4. 
Repeating Gradients: the repeating-linear-gradient(), repeating-radial-gradient(), and repeating-conic-gradient() notations</a>
    <li><a href="#ref-for-funcdef-radial-gradient③">7.3. Interpolating &lt;gradient></a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-namespacedef-css">
   <a href="https://drafts.csswg.org/cssom-1/#namespacedef-css">https://drafts.csswg.org/cssom-1/#namespacedef-css</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-namespacedef-css">2.6.2. 
Using Out-Of-Document Sources: the ElementSources interface</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-canvas">
   <a href="https://html.spec.whatwg.org/multipage/canvas.html#canvas">https://html.spec.whatwg.org/multipage/canvas.html#canvas</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-canvas">2.6. Using Elements as Images: the element() notation</a>
    <li><a href="#ref-for-canvas①">2.6.1. 
Paint Sources</a>
    <li><a href="#ref-for-canvas②">2.6.2. 
Using Out-Of-Document Sources: the ElementSources interface</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-the-img-element">
   <a href="https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element">https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-the-img-element">2.6. Using Elements as Images: the element() notation</a>
    <li><a href="#ref-for-the-img-element①">2.6.1. 
Paint Sources</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-the-p-element">
   <a href="https://html.spec.whatwg.org/multipage/grouping-content.html#the-p-element">https://html.spec.whatwg.org/multipage/grouping-content.html#the-p-element</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-the-p-element">2.6. Using Elements as Images: the element() notation</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-the-picture-element">
   <a href="https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element">https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-the-picture-element">2.3. Resolution Negotiation: the image-set() notation</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-video">
   <a href="https://html.spec.whatwg.org/multipage/media.html#video">https://html.spec.whatwg.org/multipage/media.html#video</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-video">2.6. Using Elements as Images: the element() notation</a>
    <li><a href="#ref-for-video①">2.6.1. 
Paint Sources</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-list-iterate">
   <a href="https://infra.spec.whatwg.org/#list-iterate">https://infra.spec.whatwg.org/#list-iterate</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-list-iterate">2.5.1. cross-fade() Sizing</a> <a href="#ref-for-list-iterate①">(2)</a>
    <li><a href="#ref-for-list-iterate②">2.5.2. cross-fade() Painting</a> <a href="#ref-for-list-iterate③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-list-item">
   <a href="https://infra.spec.whatwg.org/#list-item">https://infra.spec.whatwg.org/#list-item</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-list-item">2.5.1. cross-fade() Sizing</a>
    <li><a href="#ref-for-list-item①">2.5.2. cross-fade() Painting</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-tuple">
   <a href="https://infra.spec.whatwg.org/#tuple">https://infra.spec.whatwg.org/#tuple</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-tuple">2.5.1. cross-fade() Sizing</a>
    <li><a href="#ref-for-tuple①">2.5.2. cross-fade() Painting</a> <a href="#ref-for-tuple②">(2)</a> <a href="#ref-for-tuple③">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-typedef-id-selector">
   <a href="https://drafts.csswg.org/selectors-4/#typedef-id-selector">https://drafts.csswg.org/selectors-4/#typedef-id-selector</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-id-selector">2.6. Using Elements as Images: the element() notation</a> <a href="#ref-for-typedef-id-selector①">(2)</a>
    <li><a href="#ref-for-typedef-id-selector②">2.6.2. 
Using Out-Of-Document Sources: the ElementSources interface</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-SameObject">
   <a href="https://heycam.github.io/webidl/#SameObject">https://heycam.github.io/webidl/#SameObject</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-SameObject">2.6.2. 
Using Out-Of-Document Sources: the ElementSources interface</a>
   </ul>
  </aside>
  <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3>
  <ul class="index">
   <li>
    <a data-link-type="biblio">[css-backgrounds-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-propdef-background-color" style="color:initial">background-color</span>
     <li><span class="dfn-paneled" id="term-for-propdef-background-image" style="color:initial">background-image</span>
     <li><span class="dfn-paneled" id="term-for-propdef-background-position" style="color:initial">background-position</span>
     <li><span class="dfn-paneled" id="term-for-propdef-background-size" style="color:initial">background-size</span>
     <li><span class="dfn-paneled" id="term-for-valdef-background-position-center" style="color:initial">center</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-cascade-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-computed-value" style="color:initial">computed value</span>
     <li><span class="dfn-paneled" id="term-for-specified-value" style="color:initial">specified value</span>
     <li><span class="dfn-paneled" id="term-for-used-value" style="color:initial">used value</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-color-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-valuea-def-color" style="color:initial">&lt;color></span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-color-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-valdef-color-transparent" style="color:initial">transparent</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-lists-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-propdef-list-style-image" style="color:initial">list-style-image</span>
     <li><span class="dfn-paneled" id="term-for-propdef-list-style-type" style="color:initial">list-style-type</span>
     <li><span class="dfn-paneled" id="term-for-valdef-list-style-type-none" style="color:initial">none</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-ui-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-propdef-cursor" style="color:initial">cursor</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-values-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-angle-value" style="color:initial">&lt;angle></span>
     <li><span class="dfn-paneled" id="term-for-length-value" style="color:initial">&lt;length></span>
     <li><span class="dfn-paneled" id="term-for-percentage-value" style="color:initial">&lt;percentage></span>
     <li><span class="dfn-paneled" id="term-for-resolution-value" style="color:initial">&lt;resolution></span>
     <li><span class="dfn-paneled" id="term-for-string-value" style="color:initial">&lt;string></span>
     <li><span class="dfn-paneled" id="term-for-url-value" style="color:initial">&lt;url></span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-values-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-mult-req" style="color:initial">!</span>
     <li><span class="dfn-paneled" id="term-for-mult-comma" style="color:initial">#</span>
     <li><span class="dfn-paneled" id="term-for-comb-all" style="color:initial">&amp;&amp;</span>
     <li><span class="dfn-paneled" id="term-for-comb-comma" style="color:initial">,</span>
     <li><span class="dfn-paneled" id="term-for-typedef-angle-percentage" style="color:initial">&lt;angle-percentage></span>
     <li><span class="dfn-paneled" id="term-for-identifier-value" style="color:initial">&lt;custom-ident></span>
     <li><span class="dfn-paneled" id="term-for-typedef-length-percentage" style="color:initial">&lt;length-percentage></span>
     <li><span class="dfn-paneled" id="term-for-typedef-position" style="color:initial">&lt;position></span>
     <li><span class="dfn-paneled" id="term-for-mult-opt" style="color:initial">?</span>
     <li><span class="dfn-paneled" id="term-for-px" style="color:initial">px</span>
     <li><span class="dfn-paneled" id="term-for-funcdef-url" style="color:initial">url()</span>
     <li><span class="dfn-paneled" id="term-for-mult-num-range" style="color:initial">{a,b}</span>
     <li><span class="dfn-paneled" id="term-for-comb-one" style="color:initial">|</span>
     <li><span class="dfn-paneled" id="term-for-comb-any" style="color:initial">||</span>
    </ul>
   <li>
    <a data-link-type="biblio">[CSS21]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-x43" style="color:initial">stacking context</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css3-images]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-valdef-ending-shape-circle" style="color:initial">circle</span>
     <li><span class="dfn-paneled" id="term-for-concrete-object-size" style="color:initial">concrete object size</span>
     <li><span class="dfn-paneled" id="term-for-contain-constraint" style="color:initial">contain constraint</span>
     <li><span class="dfn-paneled" id="term-for-cover-constraint" style="color:initial">cover constraint</span>
     <li><span class="dfn-paneled" id="term-for-default-object-size" style="color:initial">default object size</span>
     <li><span class="dfn-paneled" id="term-for-default-sizing-algorithm" style="color:initial">default sizing algorithm</span>
     <li><span class="dfn-paneled" id="term-for-valdef-ending-shape-ellipse" style="color:initial">ellipse</span>
     <li><span class="dfn-paneled" id="term-for-intrinsic-dimensions" style="color:initial">intrinsic dimensions</span>
     <li><span class="dfn-paneled" id="term-for-funcdef-linear-gradient" style="color:initial">linear-gradient()</span>
     <li><span class="dfn-paneled" id="term-for-object-size-negotiation" style="color:initial">object size negotiation</span>
     <li><span class="dfn-paneled" id="term-for-propdef-object-position" style="color:initial">object-position</span>
     <li><span class="dfn-paneled" id="term-for-funcdef-radial-gradient" style="color:initial">radial-gradient()</span>
    </ul>
   <li>
    <a data-link-type="biblio">[CSSOM]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-namespacedef-css" style="color:initial">CSS</span>
    </ul>
   <li>
    <a data-link-type="biblio">[HTML]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-canvas" style="color:initial">canvas</span>
     <li><span class="dfn-paneled" id="term-for-the-img-element" style="color:initial">img</span>
     <li><span class="dfn-paneled" id="term-for-the-p-element" style="color:initial">p</span>
     <li><span class="dfn-paneled" id="term-for-the-picture-element" style="color:initial">picture</span>
     <li><span class="dfn-paneled" id="term-for-video" style="color:initial">video</span>
    </ul>
   <li>
    <a data-link-type="biblio">[INFRA]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-list-iterate" style="color:initial">for each</span>
     <li><span class="dfn-paneled" id="term-for-list-item" style="color:initial">item</span>
     <li><span class="dfn-paneled" id="term-for-tuple" style="color:initial">tuple</span>
    </ul>
   <li>
    <a data-link-type="biblio">[selectors-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-typedef-id-selector" style="color:initial">&lt;id-selector></span>
    </ul>
   <li>
    <a data-link-type="biblio">[WebIDL]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-SameObject" style="color:initial">SameObject</span>
    </ul>
  </ul>
  <h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2>
  <h3 class="no-num no-ref heading settled" id="normative"><span class="content">Normative References</span><a class="self-link" href="#normative"></a></h3>
  <dl>
   <dt id="biblio-css-backgrounds-3">[CSS-BACKGROUNDS-3]
   <dd>Bert Bos; Elika Etemad; Brad Kemper. <a href="https://www.w3.org/TR/css-backgrounds-3/">CSS Backgrounds and Borders Module Level 3</a>. 17 October 2017. CR. URL: <a href="https://www.w3.org/TR/css-backgrounds-3/">https://www.w3.org/TR/css-backgrounds-3/</a>
   <dt id="biblio-css-cascade-4">[CSS-CASCADE-4]
   <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-cascade-4/">CSS Cascading and Inheritance Level 4</a>. 28 August 2018. CR. URL: <a href="https://www.w3.org/TR/css-cascade-4/">https://www.w3.org/TR/css-cascade-4/</a>
   <dt id="biblio-css-color-3">[CSS-COLOR-3]
   <dd>Tantek Çelik; Chris Lilley; David Baron. <a href="https://www.w3.org/TR/css-color-3/">CSS Color Module Level 3</a>. 19 June 2018. REC. URL: <a href="https://www.w3.org/TR/css-color-3/">https://www.w3.org/TR/css-color-3/</a>
   <dt id="biblio-css-color-4">[CSS-COLOR-4]
   <dd>Tab Atkins Jr.; Chris Lilley. <a href="https://www.w3.org/TR/css-color-4/">CSS Color Module Level 4</a>. 5 March 2019. WD. URL: <a href="https://www.w3.org/TR/css-color-4/">https://www.w3.org/TR/css-color-4/</a>
   <dt id="biblio-css-lists-3">[CSS-LISTS-3]
   <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-lists-3/">CSS Lists Module Level 3</a>. 25 April 2019. WD. URL: <a href="https://www.w3.org/TR/css-lists-3/">https://www.w3.org/TR/css-lists-3/</a>
   <dt id="biblio-css-ui-4">[CSS-UI-4]
   <dd>Florian Rivoal. <a href="https://www.w3.org/TR/css-ui-4/">CSS Basic User Interface Module Level 4</a>. 22 December 2017. WD. URL: <a href="https://www.w3.org/TR/css-ui-4/">https://www.w3.org/TR/css-ui-4/</a>
   <dt id="biblio-css-values-3">[CSS-VALUES-3]
   <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-values-3/">CSS Values and Units Module Level 3</a>. 31 January 2019. CR. URL: <a href="https://www.w3.org/TR/css-values-3/">https://www.w3.org/TR/css-values-3/</a>
   <dt id="biblio-css-values-4">[CSS-VALUES-4]
   <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-values-4/">CSS Values and Units Module Level 4</a>. 31 January 2019. WD. URL: <a href="https://www.w3.org/TR/css-values-4/">https://www.w3.org/TR/css-values-4/</a>
   <dt id="biblio-css21">[CSS21]
   <dd>Bert Bos; et al. <a href="https://www.w3.org/TR/CSS2/">Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</a>. 7 June 2011. REC. URL: <a href="https://www.w3.org/TR/CSS2/">https://www.w3.org/TR/CSS2/</a>
   <dt id="biblio-css3-images">[CSS3-IMAGES]
   <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css3-images/">CSS Image Values and Replaced Content Module Level 3</a>. 17 April 2012. CR. URL: <a href="https://www.w3.org/TR/css3-images/">https://www.w3.org/TR/css3-images/</a>
   <dt id="biblio-css3-transforms">[CSS3-TRANSFORMS]
   <dd>Simon Fraser; et al. <a href="https://www.w3.org/TR/css-transforms-1/">CSS Transforms Module Level 1</a>. 14 February 2019. CR. URL: <a href="https://www.w3.org/TR/css-transforms-1/">https://www.w3.org/TR/css-transforms-1/</a>
   <dt id="biblio-cssom">[CSSOM]
   <dd>Simon Pieters; Glenn Adams. <a href="https://www.w3.org/TR/cssom-1/">CSS Object Model (CSSOM)</a>. 17 March 2016. WD. URL: <a href="https://www.w3.org/TR/cssom-1/">https://www.w3.org/TR/cssom-1/</a>
   <dt id="biblio-html">[HTML]
   <dd>Anne van Kesteren; et al. <a href="https://html.spec.whatwg.org/multipage/">HTML Standard</a>. Living Standard. URL: <a href="https://html.spec.whatwg.org/multipage/">https://html.spec.whatwg.org/multipage/</a>
   <dt id="biblio-infra">[INFRA]
   <dd>Anne van Kesteren; Domenic Denicola. <a href="https://infra.spec.whatwg.org/">Infra Standard</a>. Living Standard. URL: <a href="https://infra.spec.whatwg.org/">https://infra.spec.whatwg.org/</a>
   <dt id="biblio-media-frags">[MEDIA-FRAGS]
   <dd>Raphaël Troncy; et al. <a href="https://www.w3.org/TR/media-frags/">Media Fragments URI 1.0 (basic)</a>. 25 September 2012. REC. URL: <a href="https://www.w3.org/TR/media-frags/">https://www.w3.org/TR/media-frags/</a>
   <dt id="biblio-png">[PNG]
   <dd>Tom Lane. <a href="https://www.w3.org/TR/PNG/">Portable Network Graphics (PNG) Specification (Second Edition)</a>. 10 November 2003. REC. URL: <a href="https://www.w3.org/TR/PNG/">https://www.w3.org/TR/PNG/</a>
   <dt id="biblio-rfc2119">[RFC2119]
   <dd>S. Bradner. <a href="https://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>. March 1997. Best Current Practice. URL: <a href="https://tools.ietf.org/html/rfc2119">https://tools.ietf.org/html/rfc2119</a>
   <dt id="biblio-select">[SELECT]
   <dd>Tantek Çelik; et al. <a href="https://www.w3.org/TR/selectors-3/">Selectors Level 3</a>. 6 November 2018. REC. URL: <a href="https://www.w3.org/TR/selectors-3/">https://www.w3.org/TR/selectors-3/</a>
   <dt id="biblio-selectors-4">[SELECTORS-4]
   <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/selectors-4/">Selectors Level 4</a>. 21 November 2018. WD. URL: <a href="https://www.w3.org/TR/selectors-4/">https://www.w3.org/TR/selectors-4/</a>
   <dt id="biblio-svg-integration">[SVG-INTEGRATION]
   <dd>Cameron McCormack; Doug Schepers; Dirk Schulze. <a href="https://www.w3.org/TR/svg-integration/">SVG Integration</a>. 17 April 2014. WD. URL: <a href="https://www.w3.org/TR/svg-integration/">https://www.w3.org/TR/svg-integration/</a>
   <dt id="biblio-svg11">[SVG11]
   <dd>Erik Dahlström; et al. <a href="https://www.w3.org/TR/SVG11/">Scalable Vector Graphics (SVG) 1.1 (Second Edition)</a>. 16 August 2011. REC. URL: <a href="https://www.w3.org/TR/SVG11/">https://www.w3.org/TR/SVG11/</a>
   <dt id="biblio-webidl">[WebIDL]
   <dd>Boris Zbarsky. <a href="https://heycam.github.io/webidl/">Web IDL</a>. 15 December 2016. ED. URL: <a href="https://heycam.github.io/webidl/">https://heycam.github.io/webidl/</a>
  </dl>
  <h3 class="no-num no-ref heading settled" id="informative"><span class="content">Informative References</span><a class="self-link" href="#informative"></a></h3>
  <dl>
   <dt id="biblio-smil10">[SMIL10]
   <dd>Philipp Hoschka. <a href="https://www.w3.org/TR/1998/REC-smil-19980615/">Synchronized Multimedia Integration Language (SMIL) 1.0 Specification</a>. 15 June 1998. REC. URL: <a href="https://www.w3.org/TR/1998/REC-smil-19980615/">https://www.w3.org/TR/1998/REC-smil-19980615/</a>
  </dl>
  <h2 class="no-num no-ref heading settled" id="property-index"><span class="content">Property Index</span><a class="self-link" href="#property-index"></a></h2>
  <div class="big-element-wrapper">
   <table class="index">
    <thead>
     <tr>
      <th scope="col">Name
      <th scope="col">Value
      <th scope="col">Initial
      <th scope="col">Applies to
      <th scope="col">Inh.
      <th scope="col">%ages
      <th scope="col">Anim­ation type
      <th scope="col">Canonical order
      <th scope="col">Com­puted value
    <tbody>
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-image-resolution" id="ref-for-propdef-image-resolution⑤">image-resolution</a>
      <td>[ from-image || &lt;resolution> ] &amp;&amp; snap?
      <td>1dppx
      <td>all elements
      <td>yes
      <td>n/a
      <td>discrete
      <td>per grammar
      <td>specified keyword(s) and/or &lt;resolution> (possibly adjusted for snap, see below)
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-object-fit" id="ref-for-propdef-object-fit④">object-fit</a>
      <td>fill | none | [contain | cover] || scale-down
      <td>fill
      <td>replaced elements
      <td>no
      <td>n/a
      <td>discrete
      <td>per grammar
      <td>specified keyword(s)
   </table>
  </div>
  <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">IDL Index</span><a class="self-link" href="#idl-index"></a></h2>
<pre class="idl highlight def"><c- b>partial</c-> <c- b>namespace</c-> <a class="idl-code" data-link-type="namespace" href="https://drafts.csswg.org/cssom-1/#namespacedef-css" id="ref-for-namespacedef-css①"><c- g>CSS</c-></a> {
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <c- b>any</c-> <a data-readonly data-type="any" href="#dom-css-elementsources"><code><c- g>elementSources</c-></code></a>;
};

</pre>
  <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content">Issues Index</span><a class="self-link" href="#issues-index"></a></h2>
  <div style="counter-reset:issue">
   <div class="issue"> This solution assumes that resolution is a proxy for filesize,
	and therefore doesn’t appropriately handle multi-resolution sets of vector images,
	or mixing vector images with raster ones (e.g. for icons).
	For example, use a vector for high-res,
	pixel-optimized bitmap for low-res,
	and same vector again for low-bandwidth (because it’s much smaller, even though it’s higher resolution).<a href="#issue-86c01534"> ↵ </a></div>
   <div class="issue"> We should add "w" and "h" dimensions as a possibility, and a "format()" function,
	to match the functionality of HTML’s <a data-link-type="element" href="https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element">picture</a>.<a href="#issue-8fea40a4"> ↵ </a></div>
   <div class="issue"> Is this restriction needed?<a href="#issue-92756fb8"> ↵ </a></div>
   <div class="issue"> Per WG resolution,
	define a notion of "equality" for images,
	and combine "same" images at computed-value time,
	summing their percentages.<a href="#issue-efd818cb"> ↵ </a></div>
   <div class="issue"> Per WG resolution,
	simplify directly-nested <a class="css" data-link-type="maybe" href="#funcdef-cross-fade">cross-fade()</a> at computed-value time
	by just distributing the percentage and flattening; <span class="css">cross-fade(A 10%, cross-fade(B 30%, C 70%) 90%)</span> becomes <span class="css">cross-fade(A 10%, B 27%, C 63%)</span>.<a href="#issue-84499f31"> ↵ </a></div>
   <div class="issue"> Do we need to be able to refer to elements in external documents
		(such as SVG paint servers)?
		Or is it enough to just use url() for this? <a href="#issue-734aa3f2"> ↵ </a></div>
   <div class="issue"> This name conflicts with a somewhat similar function in GCPM.
		This needs to be resolved somehow. <a href="#issue-2c656975"> ↵ </a></div>
   <div class="issue"> Want the ability to do "reflections" of an element,
		either as a background-image on the element or in a pseudo-element.
		This needs to be specially-handled to avoid triggering the cycle-detection. <a href="#issue-e85fd299"> ↵ </a></div>
   <div class="issue"> When we have overflow:paged,
		how can we address a single page in the view? <a href="#issue-1b39a877"> ↵ </a></div>
   <div class="issue"> Requiring some degree of stacking context on the element appears to be required for an efficient implementation.
				Do we need a full stacking context, or just a pseudo-stacking context?
				Should it need to be a stacking context normally,
				or can we just render it as a stacking context when rendering it to element()? <a href="#issue-ed057ccb"> ↵ </a></div>
   <div class="issue"> This reuse of the ID selector matches Moz behavior.
		I’m trying to avoid slapping a <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#identifier-value">&lt;custom-ident></a> right in the beginning of the grammar,
		as that eats too much syntax-space.
		Another possibility, though, is to start the value with a language-defined keyword <em>followed by</em> a <span class="production">&lt;custom-ident></span>,
		like <span class="css">element(external fancy)</span> or something.
		Naming suggestions welcome. <a href="#issue-049385d0"> ↵ </a></div>
   <div class="issue"> Usually in conic gradients the sharp transition at 0deg is undesirable, which is typically avoided by making sure the first and last color stops are the same color. Perhaps it would be useful to have a keyword for automatically achieving this. <a href="#issue-c602e287"> ↵ </a></div>
   <div class="issue"> Would a radius (inner &amp; outer) for clipping the gradient be useful? If so, we could also support lengths in color stop positions, since we now have a specific radius. <a href="#issue-e52a09ba"> ↵ </a></div>
   <div class="issue"> Are elliptical conic gradients useful? Do graphics libraries support them? <a href="#issue-51674aed"> ↵ </a></div>
   <div class="issue"> Add a visual example of a color hint being used.<a href="#issue-7a141efc"> ↵ </a></div>
   <div class="issue"> <a href="https://github.com/w3c/csswg-drafts/issues/2532">Per WG resolution</a>,
	define the <span class="css">stripes()</span> function
	which creates a 1D image for use in borders/outlines.<a href="#issue-34ec5a23"> ↵ </a></div>
   <div class="issue"> The <a class="css" data-link-type="maybe" href="#funcdef-image-set">image-set()</a> notation can alter the intrinsic resolution of an image,
	which ideally would be automatically honored without having to set this property.
	How should we best address this?
	Change the initial value to <span class="css">auto</span>, meaning "1dppx, unless CSS says otherwise"?
	Say that image-resolution has no effect on images whose resolution was set by something else in CSS?
	Or somehow wordsmithing <span class="css">image-set()</span> in some way such that it always produces <span class="css">1dppx</span> images somehow?<a href="#issue-8ce643a0"> ↵ </a></div>
   <div class="issue"> Special-case interpolating to/from no image,
	like "background-image: url(foo);" to "background-image: none;".<a href="#issue-d366087c"> ↵ </a></div>
   <div class="issue"> This section needs review and improvement.
	In particular, I believe the handling of linear-gradient() is incomplete -
	I think we want to specifically interpolate the "length" of the gradient line
	(the distance between 0% and 100%)
	between the starting and ending positions explicitly,
	so it doesn’t grow and then shrink over a single animation.<a href="#issue-f1783900"> ↵ </a></div>
  </div>
  <aside class="dfn-panel" data-for="typedef-image">
   <b><a href="#typedef-image">#typedef-image</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-image②">2. 2D Image Values: the &lt;image> type</a> <a href="#ref-for-typedef-image③">(2)</a> <a href="#ref-for-typedef-image④">(3)</a> <a href="#ref-for-typedef-image⑤">(4)</a>
    <li><a href="#ref-for-typedef-image⑥">2.1. Image File Formats</a> <a href="#ref-for-typedef-image⑦">(2)</a> <a href="#ref-for-typedef-image⑧">(3)</a>
    <li><a href="#ref-for-typedef-image⑨">2.3. Resolution Negotiation: the image-set() notation</a> <a href="#ref-for-typedef-image①⓪">(2)</a>
    <li><a href="#ref-for-typedef-image①①">2.5. Combining images: the cross-fade() notation</a>
    <li><a href="#ref-for-typedef-image①②">2.5.1. cross-fade() Sizing</a> <a href="#ref-for-typedef-image①③">(2)</a> <a href="#ref-for-typedef-image①④">(3)</a>
    <li><a href="#ref-for-typedef-image①⑤">2.5.2. cross-fade() Painting</a>
    <li><a href="#ref-for-typedef-image①⑥">3. 
Gradients</a>
    <li><a href="#ref-for-typedef-image①⑦">7.1. Interpolating &lt;image></a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="invalid-image">
   <b><a href="#invalid-image">#invalid-image</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-invalid-image">2. 2D Image Values: the &lt;image> type</a> <a href="#ref-for-invalid-image①">(2)</a> <a href="#ref-for-invalid-image②">(3)</a>
    <li><a href="#ref-for-invalid-image③">2.4.1. Image Fallbacks</a> <a href="#ref-for-invalid-image④">(2)</a>
    <li><a href="#ref-for-invalid-image⑤">2.4.2. Image Fragments</a>
    <li><a href="#ref-for-invalid-image⑥">2.6. Using Elements as Images: the element() notation</a>
    <li><a href="#ref-for-invalid-image⑦">2.6.2. 
Using Out-Of-Document Sources: the ElementSources interface</a>
    <li><a href="#ref-for-invalid-image⑧">2.6.3. 
Cycle Detection</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="loading-image">
   <b><a href="#loading-image">#loading-image</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-loading-image">2. 2D Image Values: the &lt;image> type</a> <a href="#ref-for-loading-image①">(2)</a> <a href="#ref-for-loading-image②">(3)</a> <a href="#ref-for-loading-image③">(4)</a>
    <li><a href="#ref-for-loading-image④">2.4.1. Image Fallbacks</a> <a href="#ref-for-loading-image⑤">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="funcdef-image-set">
   <b><a href="#funcdef-image-set">#funcdef-image-set</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-funcdef-image-set">2. 2D Image Values: the &lt;image> type</a>
    <li><a href="#ref-for-funcdef-image-set①">2.3. Resolution Negotiation: the image-set() notation</a> <a href="#ref-for-funcdef-image-set②">(2)</a> <a href="#ref-for-funcdef-image-set③">(3)</a> <a href="#ref-for-funcdef-image-set④">(4)</a> <a href="#ref-for-funcdef-image-set⑤">(5)</a> <a href="#ref-for-funcdef-image-set⑥">(6)</a> <a href="#ref-for-funcdef-image-set⑦">(7)</a> <a href="#ref-for-funcdef-image-set⑧">(8)</a> <a href="#ref-for-funcdef-image-set⑨">(9)</a>
    <li><a href="#ref-for-funcdef-image-set①⓪">6.1. Overriding Image Resolutions: the image-resolution property</a> <a href="#ref-for-funcdef-image-set①①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-image-set-option">
   <b><a href="#typedef-image-set-option">#typedef-image-set-option</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-image-set-option">2.3. Resolution Negotiation: the image-set() notation</a> <a href="#ref-for-typedef-image-set-option①">(2)</a> <a href="#ref-for-typedef-image-set-option②">(3)</a> <a href="#ref-for-typedef-image-set-option③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="funcdef-image">
   <b><a href="#funcdef-image">#funcdef-image</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-funcdef-image①">2. 2D Image Values: the &lt;image> type</a>
    <li><a href="#ref-for-funcdef-image②">2.4. Image Fallbacks and Annotations: the image() notation</a> <a href="#ref-for-funcdef-image③">(2)</a> <a href="#ref-for-funcdef-image④">(3)</a> <a href="#ref-for-funcdef-image⑤">(4)</a> <a href="#ref-for-funcdef-image⑥">(5)</a>
    <li><a href="#ref-for-funcdef-image⑦">2.4.1. Image Fallbacks</a> <a href="#ref-for-funcdef-image⑧">(2)</a> <a href="#ref-for-funcdef-image⑨">(3)</a> <a href="#ref-for-funcdef-image①⓪">(4)</a>
    <li><a href="#ref-for-funcdef-image①①">2.4.2. Image Fragments</a> <a href="#ref-for-funcdef-image①②">(2)</a> <a href="#ref-for-funcdef-image①③">(3)</a> <a href="#ref-for-funcdef-image①④">(4)</a> <a href="#ref-for-funcdef-image①⑤">(5)</a>
    <li><a href="#ref-for-funcdef-image①⑥">2.4.3. Solid-color Images</a>
    <li><a href="#ref-for-funcdef-image①⑦"> Changes Since Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-image-tags">
   <b><a href="#typedef-image-tags">#typedef-image-tags</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-image-tags">2.4. Image Fallbacks and Annotations: the image() notation</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-image-src">
   <b><a href="#typedef-image-src">#typedef-image-src</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-image-src">2.4. Image Fallbacks and Annotations: the image() notation</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="funcdef-cross-fade">
   <b><a href="#funcdef-cross-fade">#funcdef-cross-fade</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-funcdef-cross-fade">2. 2D Image Values: the &lt;image> type</a>
    <li><a href="#ref-for-funcdef-cross-fade①">2.5. Combining images: the cross-fade() notation</a> <a href="#ref-for-funcdef-cross-fade②">(2)</a> <a href="#ref-for-funcdef-cross-fade③">(3)</a> <a href="#ref-for-funcdef-cross-fade④">(4)</a>
    <li><a href="#ref-for-funcdef-cross-fade⑤">2.5.1. cross-fade() Sizing</a> <a href="#ref-for-funcdef-cross-fade⑥">(2)</a> <a href="#ref-for-funcdef-cross-fade⑦">(3)</a> <a href="#ref-for-funcdef-cross-fade⑧">(4)</a>
    <li><a href="#ref-for-funcdef-cross-fade⑨">2.5.2. cross-fade() Painting</a> <a href="#ref-for-funcdef-cross-fade①⓪">(2)</a> <a href="#ref-for-funcdef-cross-fade①①">(3)</a> <a href="#ref-for-funcdef-cross-fade①②">(4)</a>
    <li><a href="#ref-for-funcdef-cross-fade①③">2.5.3. Simplifying Complex cross-fade()</a> <a href="#ref-for-funcdef-cross-fade①④">(2)</a>
    <li><a href="#ref-for-funcdef-cross-fade①⑤">7.2. Interpolating cross-fade()</a> <a href="#ref-for-funcdef-cross-fade①⑥">(2)</a>
    <li><a href="#ref-for-funcdef-cross-fade①⑦">7.3. Interpolating &lt;gradient></a>
    <li><a href="#ref-for-funcdef-cross-fade①⑧">8. Serialization</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-cf-image">
   <b><a href="#typedef-cf-image">#typedef-cf-image</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-cf-image">2.5. Combining images: the cross-fade() notation</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="intrinsic-dimensions-of-a-cross-fade">
   <b><a href="#intrinsic-dimensions-of-a-cross-fade">#intrinsic-dimensions-of-a-cross-fade</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-intrinsic-dimensions-of-a-cross-fade">2.5.2. cross-fade() Painting</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="funcdef-element">
   <b><a href="#funcdef-element">#funcdef-element</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-funcdef-element①">2.6. Using Elements as Images: the element() notation</a> <a href="#ref-for-funcdef-element②">(2)</a> <a href="#ref-for-funcdef-element③">(3)</a> <a href="#ref-for-funcdef-element④">(4)</a> <a href="#ref-for-funcdef-element⑤">(5)</a> <a href="#ref-for-funcdef-element⑥">(6)</a> <a href="#ref-for-funcdef-element⑦">(7)</a> <a href="#ref-for-funcdef-element⑧">(8)</a> <a href="#ref-for-funcdef-element⑨">(9)</a> <a href="#ref-for-funcdef-element①⓪">(10)</a> <a href="#ref-for-funcdef-element①①">(11)</a>
    <li><a href="#ref-for-funcdef-element①②">2.6.2. 
Using Out-Of-Document Sources: the ElementSources interface</a> <a href="#ref-for-funcdef-element①③">(2)</a> <a href="#ref-for-funcdef-element①④">(3)</a> <a href="#ref-for-funcdef-element①⑤">(4)</a> <a href="#ref-for-funcdef-element①⑥">(5)</a>
    <li><a href="#ref-for-funcdef-element①⑦">2.6.3. 
Cycle Detection</a> <a href="#ref-for-funcdef-element①⑧">(2)</a> <a href="#ref-for-funcdef-element①⑨">(3)</a>
    <li><a href="#ref-for-funcdef-element②⓪"> Changes Since Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="decorated-bounding-box">
   <b><a href="#decorated-bounding-box">#decorated-bounding-box</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-decorated-bounding-box">2.6. Using Elements as Images: the element() notation</a> <a href="#ref-for-decorated-bounding-box①">(2)</a> <a href="#ref-for-decorated-bounding-box②">(3)</a> <a href="#ref-for-decorated-bounding-box③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="element-not-rendered">
   <b><a href="#element-not-rendered">#element-not-rendered</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-element-not-rendered">2.6. Using Elements as Images: the element() notation</a> <a href="#ref-for-element-not-rendered①">(2)</a>
    <li><a href="#ref-for-element-not-rendered②">2.6.1. 
Paint Sources</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="paint-source">
   <b><a href="#paint-source">#paint-source</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-paint-source">2.6. Using Elements as Images: the element() notation</a> <a href="#ref-for-paint-source①">(2)</a>
    <li><a href="#ref-for-paint-source②">2.6.2. 
Using Out-Of-Document Sources: the ElementSources interface</a> <a href="#ref-for-paint-source③">(2)</a> <a href="#ref-for-paint-source④">(3)</a> <a href="#ref-for-paint-source⑤">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-css-elementsources">
   <b><a href="#dom-css-elementsources">#dom-css-elementsources</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-css-elementsources">2.6. Using Elements as Images: the element() notation</a>
    <li><a href="#ref-for-dom-css-elementsources①">2.6.2. 
Using Out-Of-Document Sources: the ElementSources interface</a> <a href="#ref-for-dom-css-elementsources②">(2)</a> <a href="#ref-for-dom-css-elementsources③">(3)</a> <a href="#ref-for-dom-css-elementsources④">(4)</a> <a href="#ref-for-dom-css-elementsources⑤">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="gradient-function">
   <b><a href="#gradient-function">#gradient-function</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-gradient-function">3.5. Defining Gradient Color</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-gradient">
   <b><a href="#typedef-gradient">#typedef-gradient</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-gradient">2. 2D Image Values: the &lt;image> type</a>
    <li><a href="#ref-for-typedef-gradient①">3. 
Gradients</a>
    <li><a href="#ref-for-typedef-gradient②">7.3. Interpolating &lt;gradient></a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="gradient-box">
   <b><a href="#gradient-box">#gradient-box</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-gradient-box">3. 
Gradients</a> <a href="#ref-for-gradient-box①">(2)</a>
    <li><a href="#ref-for-gradient-box②">3.3.1. 
conic-gradient() Syntax</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="starting-point">
   <b><a href="#starting-point">#starting-point</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-starting-point">3.5. Defining Gradient Color</a>
    <li><a href="#ref-for-starting-point①">3.5.1. 
Color Stop Lists</a> <a href="#ref-for-starting-point②">(2)</a> <a href="#ref-for-starting-point③">(3)</a> <a href="#ref-for-starting-point④">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="ending-point">
   <b><a href="#ending-point">#ending-point</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-ending-point">3.5. Defining Gradient Color</a>
    <li><a href="#ref-for-ending-point①">3.5.1. 
Color Stop Lists</a> <a href="#ref-for-ending-point②">(2)</a> <a href="#ref-for-ending-point③">(3)</a> <a href="#ref-for-ending-point④">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="gradient-line">
   <b><a href="#gradient-line">#gradient-line</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-gradient-line">3. 
Gradients</a>
    <li><a href="#ref-for-gradient-line①">3.3.2. 
Placing Color Stops</a> <a href="#ref-for-gradient-line②">(2)</a>
    <li><a href="#ref-for-gradient-line③">3.5. Defining Gradient Color</a> <a href="#ref-for-gradient-line④">(2)</a> <a href="#ref-for-gradient-line⑤">(3)</a>
    <li><a href="#ref-for-gradient-line⑥">3.5.1. 
Color Stop Lists</a> <a href="#ref-for-gradient-line⑦">(2)</a> <a href="#ref-for-gradient-line⑧">(3)</a> <a href="#ref-for-gradient-line⑨">(4)</a>
    <li><a href="#ref-for-gradient-line①⓪">3.5.2. 
Coloring the Gradient Line</a> <a href="#ref-for-gradient-line①①">(2)</a> <a href="#ref-for-gradient-line①②">(3)</a> <a href="#ref-for-gradient-line①③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="funcdef-conic-gradient">
   <b><a href="#funcdef-conic-gradient">#funcdef-conic-gradient</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-funcdef-conic-gradient">3. 
Gradients</a>
    <li><a href="#ref-for-funcdef-conic-gradient①">3.3. 
Conic Gradients: the conic-gradient() notation</a>
    <li><a href="#ref-for-funcdef-conic-gradient②">3.3.1. 
conic-gradient() Syntax</a>
    <li><a href="#ref-for-funcdef-conic-gradient③">3.3.3. 
Conic Gradient Examples</a>
    <li><a href="#ref-for-funcdef-conic-gradient④">3.4. 
Repeating Gradients: the repeating-linear-gradient(), repeating-radial-gradient(), and repeating-conic-gradient() notations</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="conic-gradient-gradient-center">
   <b><a href="#conic-gradient-gradient-center">#conic-gradient-gradient-center</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-conic-gradient-gradient-center">3.3.2. 
Placing Color Stops</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="funcdef-repeating-linear-gradient">
   <b><a href="#funcdef-repeating-linear-gradient">#funcdef-repeating-linear-gradient</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-funcdef-repeating-linear-gradient">3. 
Gradients</a>
    <li><a href="#ref-for-funcdef-repeating-linear-gradient①">3.4. 
Repeating Gradients: the repeating-linear-gradient(), repeating-radial-gradient(), and repeating-conic-gradient() notations</a>
    <li><a href="#ref-for-funcdef-repeating-linear-gradient②">7.3. Interpolating &lt;gradient></a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="funcdef-repeating-radial-gradient">
   <b><a href="#funcdef-repeating-radial-gradient">#funcdef-repeating-radial-gradient</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-funcdef-repeating-radial-gradient">3. 
Gradients</a>
    <li><a href="#ref-for-funcdef-repeating-radial-gradient①">3.4. 
Repeating Gradients: the repeating-linear-gradient(), repeating-radial-gradient(), and repeating-conic-gradient() notations</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="funcdef-repeating-conic-gradient">
   <b><a href="#funcdef-repeating-conic-gradient">#funcdef-repeating-conic-gradient</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-funcdef-repeating-conic-gradient">3. 
Gradients</a>
    <li><a href="#ref-for-funcdef-repeating-conic-gradient①">3.4. 
Repeating Gradients: the repeating-linear-gradient(), repeating-radial-gradient(), and repeating-conic-gradient() notations</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="color-stop">
   <b><a href="#color-stop">#color-stop</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-color-stop">3.5. Defining Gradient Color</a>
    <li><a href="#ref-for-color-stop①">3.5.1. 
Color Stop Lists</a> <a href="#ref-for-color-stop②">(2)</a> <a href="#ref-for-color-stop③">(3)</a> <a href="#ref-for-color-stop④">(4)</a> <a href="#ref-for-color-stop⑤">(5)</a> <a href="#ref-for-color-stop⑥">(6)</a> <a href="#ref-for-color-stop⑦">(7)</a>
    <li><a href="#ref-for-color-stop⑧">3.5.2. 
Coloring the Gradient Line</a> <a href="#ref-for-color-stop⑨">(2)</a> <a href="#ref-for-color-stop①⓪">(3)</a> <a href="#ref-for-color-stop①①">(4)</a> <a href="#ref-for-color-stop①②">(5)</a> <a href="#ref-for-color-stop①③">(6)</a> <a href="#ref-for-color-stop①④">(7)</a> <a href="#ref-for-color-stop①⑤">(8)</a> <a href="#ref-for-color-stop①⑥">(9)</a> <a href="#ref-for-color-stop①⑦">(10)</a> <a href="#ref-for-color-stop①⑧">(11)</a> <a href="#ref-for-color-stop①⑨">(12)</a> <a href="#ref-for-color-stop②⓪">(13)</a> <a href="#ref-for-color-stop②①">(14)</a> <a href="#ref-for-color-stop②②">(15)</a> <a href="#ref-for-color-stop②③">(16)</a>
    <li><a href="#ref-for-color-stop②④">3.5.3. 
Color Stop “Fixup”</a> <a href="#ref-for-color-stop②⑤">(2)</a> <a href="#ref-for-color-stop②⑥">(3)</a> <a href="#ref-for-color-stop②⑦">(4)</a> <a href="#ref-for-color-stop②⑧">(5)</a> <a href="#ref-for-color-stop②⑨">(6)</a> <a href="#ref-for-color-stop③⓪">(7)</a> <a href="#ref-for-color-stop③①">(8)</a> <a href="#ref-for-color-stop③②">(9)</a> <a href="#ref-for-color-stop③③">(10)</a> <a href="#ref-for-color-stop③④">(11)</a> <a href="#ref-for-color-stop③⑤">(12)</a> <a href="#ref-for-color-stop③⑥">(13)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="color-transition-hint">
   <b><a href="#color-transition-hint">#color-transition-hint</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-color-transition-hint">3.5.1. 
Color Stop Lists</a> <a href="#ref-for-color-transition-hint①">(2)</a> <a href="#ref-for-color-transition-hint②">(3)</a>
    <li><a href="#ref-for-color-transition-hint③">3.5.2. 
Coloring the Gradient Line</a> <a href="#ref-for-color-transition-hint④">(2)</a> <a href="#ref-for-color-transition-hint⑤">(3)</a>
    <li><a href="#ref-for-color-transition-hint⑥">3.5.3. 
Color Stop “Fixup”</a> <a href="#ref-for-color-transition-hint⑦">(2)</a> <a href="#ref-for-color-transition-hint⑧">(3)</a> <a href="#ref-for-color-transition-hint⑨">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="color-stop-list">
   <b><a href="#color-stop-list">#color-stop-list</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-color-stop-list">3.5.1. 
Color Stop Lists</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-color-stop-list">
   <b><a href="#typedef-color-stop-list">#typedef-color-stop-list</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-color-stop-list">3.5.1. 
Color Stop Lists</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-linear-color-stop">
   <b><a href="#typedef-linear-color-stop">#typedef-linear-color-stop</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-linear-color-stop">3.5.1. 
Color Stop Lists</a> <a href="#ref-for-typedef-linear-color-stop①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-linear-color-hint">
   <b><a href="#typedef-linear-color-hint">#typedef-linear-color-hint</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-linear-color-hint">3.5.1. 
Color Stop Lists</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-color-stop-length">
   <b><a href="#typedef-color-stop-length">#typedef-color-stop-length</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-color-stop-length">3.5.1. 
Color Stop Lists</a> <a href="#ref-for-typedef-color-stop-length①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-angular-color-stop-list">
   <b><a href="#typedef-angular-color-stop-list">#typedef-angular-color-stop-list</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-angular-color-stop-list">3.3.1. 
conic-gradient() Syntax</a>
    <li><a href="#ref-for-typedef-angular-color-stop-list①">3.5.1. 
Color Stop Lists</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-angular-color-stop">
   <b><a href="#typedef-angular-color-stop">#typedef-angular-color-stop</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-angular-color-stop">3.5.1. 
Color Stop Lists</a> <a href="#ref-for-typedef-angular-color-stop①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-angular-color-hint">
   <b><a href="#typedef-angular-color-hint">#typedef-angular-color-hint</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-angular-color-hint">3.5.1. 
Color Stop Lists</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-color-stop-angle">
   <b><a href="#typedef-color-stop-angle">#typedef-color-stop-angle</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-color-stop-angle">3.5.1. 
Color Stop Lists</a> <a href="#ref-for-typedef-color-stop-angle①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-color-stop">
   <b><a href="#typedef-color-stop">#typedef-color-stop</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-color-stop">7.3. Interpolating &lt;gradient></a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-object-fit">
   <b><a href="#propdef-object-fit">#propdef-object-fit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-object-fit">5.1. Sizing Objects: the object-fit property</a> <a href="#ref-for-propdef-object-fit①">(2)</a> <a href="#ref-for-propdef-object-fit②">(3)</a> <a href="#ref-for-propdef-object-fit③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-object-fit-none">
   <b><a href="#valdef-object-fit-none">#valdef-object-fit-none</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-object-fit-none">5.1. Sizing Objects: the object-fit property</a> <a href="#ref-for-valdef-object-fit-none①">(2)</a> <a href="#ref-for-valdef-object-fit-none②">(3)</a> <a href="#ref-for-valdef-object-fit-none③">(4)</a> <a href="#ref-for-valdef-object-fit-none④">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-object-fit-contain">
   <b><a href="#valdef-object-fit-contain">#valdef-object-fit-contain</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-object-fit-contain">5.1. Sizing Objects: the object-fit property</a> <a href="#ref-for-valdef-object-fit-contain①">(2)</a> <a href="#ref-for-valdef-object-fit-contain②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-object-fit-cover">
   <b><a href="#valdef-object-fit-cover">#valdef-object-fit-cover</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-object-fit-cover">5.1. Sizing Objects: the object-fit property</a> <a href="#ref-for-valdef-object-fit-cover①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-object-fit-scale-down">
   <b><a href="#valdef-object-fit-scale-down">#valdef-object-fit-scale-down</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-object-fit-scale-down">5.1. Sizing Objects: the object-fit property</a> <a href="#ref-for-valdef-object-fit-scale-down①">(2)</a> <a href="#ref-for-valdef-object-fit-scale-down②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-image-resolution">
   <b><a href="#propdef-image-resolution">#propdef-image-resolution</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-image-resolution">6.1. Overriding Image Resolutions: the image-resolution property</a> <a href="#ref-for-propdef-image-resolution①">(2)</a> <a href="#ref-for-propdef-image-resolution②">(3)</a> <a href="#ref-for-propdef-image-resolution③">(4)</a>
    <li><a href="#ref-for-propdef-image-resolution④"> Changes Since Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="intrinsic-resolution">
   <b><a href="#intrinsic-resolution">#intrinsic-resolution</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-intrinsic-resolution①">6.1. Overriding Image Resolutions: the image-resolution property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-image-resolution-snap">
   <b><a href="#valdef-image-resolution-snap">#valdef-image-resolution-snap</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-image-resolution-snap">6.1. Overriding Image Resolutions: the image-resolution property</a> <a href="#ref-for-valdef-image-resolution-snap①">(2)</a>
   </ul>
  </aside>
<script>/* script-var-click-highlighting */

    document.addEventListener("click", e=>{
        if(e.target.nodeName == "VAR") {
            highlightSameAlgoVars(e.target);
        }
    });
    {
        const indexCounts = new Map();
        const indexNames = new Map();
        function highlightSameAlgoVars(v) {
            // Find the algorithm container.
            let algoContainer = null;
            let searchEl = v;
            while(algoContainer == null && searchEl != document.body) {
                searchEl = searchEl.parentNode;
                if(searchEl.hasAttribute("data-algorithm")) {
                    algoContainer = searchEl;
                }
            }

            // Not highlighting document-global vars,
            // too likely to be unrelated.
            if(algoContainer == null) return;

            const algoName = algoContainer.getAttribute("data-algorithm");
            const varName = getVarName(v);
            const addClass = !v.classList.contains("selected");
            let highlightClass = null;
            if(addClass) {
                const index = chooseHighlightIndex(algoName, varName);
                indexCounts.get(algoName)[index] += 1;
                indexNames.set(algoName+"///"+varName, index);
                highlightClass = nameFromIndex(index);
            } else {
                const index = previousHighlightIndex(algoName, varName);
                indexCounts.get(algoName)[index] -= 1;
                highlightClass = nameFromIndex(index);
            }

            // Find all same-name vars, and toggle their class appropriately.
            for(const el of algoContainer.querySelectorAll("var")) {
                if(getVarName(el) == varName) {
                    el.classList.toggle("selected", addClass);
                    el.classList.toggle(highlightClass, addClass);
                }
            }
        }
        function getVarName(el) {
            return el.textContent.replace(/(\s| )+/, " ").trim();
        }
        function chooseHighlightIndex(algoName, varName) {
            let indexes = null;
            if(indexCounts.has(algoName)) {
                indexes = indexCounts.get(algoName);
            } else {
                // 7 classes right now
                indexes = [0,0,0,0,0,0,0];
                indexCounts.set(algoName, indexes);
            }

            // If the element was recently unclicked,
            // *and* that color is still unclaimed,
            // give it back the same color.
            const lastIndex = previousHighlightIndex(algoName, varName);
            if(indexes[lastIndex] === 0) return lastIndex;

            // Find the earliest index with the lowest count.
            const minCount = Math.min.apply(null, indexes);
            let index = null;
            for(var i = 0; i < indexes.length; i++) {
                if(indexes[i] == minCount) {
                    return i;
                }
            }
        }
        function previousHighlightIndex(algoName, varName) {
            return indexNames.get(algoName+"///"+varName);
        }
        function nameFromIndex(index) {
            return "selected" + index;
        }
    }
    </script>
<script>/* script-caniuse-panel */

            window.addEventListener("load", function(){
                var panels = [].slice.call(document.querySelectorAll(".caniuse-status"));
                for(var i = 0; i < panels.length; i++) {
                    var panel = panels[i];
                    var dfn = document.querySelector("#" + panel.getAttribute("data-dfn-id"));
                    var rect = dfn.getBoundingClientRect();
                    panel.style.top = (window.scrollY + rect.top) + "px";
                }
            });
            document.body.addEventListener("click", function(e) {
                if(e.target.classList.contains("caniuse-panel-btn")) {
                    e.target.parentNode.classList.toggle("wrapped");
                }
            });</script>
<script>/* script-dfn-panel */

document.body.addEventListener("click", function(e) {
    var queryAll = function(sel) { return [].slice.call(document.querySelectorAll(sel)); }
    // Find the dfn element or panel, if any, that was clicked on.
    var el = e.target;
    var target;
    var hitALink = false;
    while(el.parentElement) {
        if(el.tagName == "A") {
            // Clicking on a link in a <dfn> shouldn't summon the panel
            hitALink = true;
        }
        if(el.classList.contains("dfn-paneled")) {
            target = "dfn";
            break;
        }
        if(el.classList.contains("dfn-panel")) {
            target = "dfn-panel";
            break;
        }
        el = el.parentElement;
    }
    if(target != "dfn-panel") {
        // Turn off any currently "on" or "activated" panels.
        queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(function(el){
            el.classList.remove("on");
            el.classList.remove("activated");
        });
    }
    if(target == "dfn" && !hitALink) {
        // open the panel
        var dfnPanel = document.querySelector(".dfn-panel[data-for='" + el.id + "']");
        if(dfnPanel) {
            dfnPanel.classList.add("on");
            var rect = el.getBoundingClientRect();
            dfnPanel.style.left = window.scrollX + rect.right + 5 + "px";
            dfnPanel.style.top = window.scrollY + rect.top + "px";
            var panelRect = dfnPanel.getBoundingClientRect();
            var panelWidth = panelRect.right - panelRect.left;
            if(panelRect.right > document.body.scrollWidth && (rect.left - (panelWidth + 5)) > 0) {
                // Reposition, because the panel is overflowing
                dfnPanel.style.left = window.scrollX + rect.left - (panelWidth + 5) + "px";
            }
        } else {
            console.log("Couldn't find .dfn-panel[data-for='" + el.id + "']");
        }
    } else if(target == "dfn-panel") {
        // Switch it to "activated" state, which pins it.
        el.classList.add("activated");
        el.style.left = null;
        el.style.top = null;
    }

});
</script>